Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242864

Increase the default, internal buffer size of the Streams in java.util.zip

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 15
    • performance
    • None

      DeflaterInputStream, GZIPInputStream, GZIPOutputStream, InflaterInputStream, DeflaterOutputStream all use an internal byte buffer of 512 bytes by default.

      While this buffer size is configurable, increasing the default to a bigger size (e.g. 4096 bytes) can considerably speed up (up to 50%) read and write operations on these streams when they are created with the default buffer size.

      Some performance numbers for InflaterOutputStream can be found in the JMH benchmark attached to JDK-8242848.

            simonis Volker Simonis
            simonis Volker Simonis
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: