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

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

    XMLWordPrintable

Details

    • Enhancement
    • Status: Open
    • P4
    • Resolution: Unresolved
    • 15
    • None
    • performance
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: