ZIP entry copy without recompression

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      As per Eirik's PR:

      https://github.com/openjdk/jdk/pull/12099

      ===
      A common use case for java.util.zip in build tools involves copying entries from a ZipFile or ZipInputStream to a ZipOutputStream without actually modifying the data.

      Inflating an entry just to immediately deflate it again with no modifications seems wasteful.

      This PR introduces ZipFileInflaterInputStream.transferTo which copies compressed data directly to ZipOutputStreams raw data stream.

      I'm typically seeing a 15 X improvement when copying xalan.jar to a ZipOutputStream backed by a buffered file OutputStream, or 22 X when backed by OutputStream.nullOutputStream().

      ===

            Assignee:
            Jaikiran Pai
            Reporter:
            Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: