TrueZIP
  1. TrueZIP
  2. TRUEZIP-139

IOException when zipping/unzipping entries > 4GB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: TrueZIP 7.2, TrueZIP 7.3 RC 1, TrueZIP 7.3, TrueZIP 7.3.1, TrueZIP 7.3.2, TrueZIP 7.3.3, TrueZIP 7.3.4, TrueZIP 7.4, TrueZIP 7.4.1, TrueZIP 7.4.2
    • Fix Version/s: TrueZIP 7.2.1, TrueZIP 7.4.3
    • Component/s: TrueZIP Driver ZIP
    • Labels:
      None
    • Environment:

      Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) on OS X
      Java(TM) SE Runtime Environment (build 1.7.0_01-b08) on Windows Vista

      Description

      I tried to replace the standard java.util.zip package with the truezip package to be able to manage zip files >4GB. However, as soon as I try to process a file >4GB with the attached class I get the following error:

      INFO: Zipping: /Users/Shared/Movies/f0199b-028.avi Into:/Users/Shared/Movies/f0199b-028.avi.zip
      DEBUG: Zipping File: /Users/Shared/Movies/f0199b-028.avi
      INFO: Unzipping: /Users/Shared/Movies/f0199b-028.avi.zip Into:/Users/Shared/Movies/zip-unzipped/
      DEBUG: Unzipping File: f0199b-028.avi
      java.io.EOFException: Unexpected end of ZLIB input stream
      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
      at de.schlichtherle.truezip.io.SynchronizedInputStream.read(SynchronizedInputStream.java:66)
      at de.schlichtherle.truezip.io.DecoratingInputStream.read(DecoratingInputStream.java:59)
      at ch.docuteam.sandbox.Zipper.unzipEntry(Zipper.java:353)
      at ch.docuteam.sandbox.Zipper.unzip(Zipper.java:255)
      at ch.docuteam.sandbox.Zipper.main(Zipper.java:47)

        Issue Links

          Activity

          Hide
          Christian Schlichtherle added a comment -

          Marked as duplicate.

          Show
          Christian Schlichtherle added a comment - Marked as duplicate.
          Hide
          Christian Schlichtherle added a comment -

          Fixed in TrueZIP 7.2.1, which is available on Maven Central.

          Show
          Christian Schlichtherle added a comment - Fixed in TrueZIP 7.2.1, which is available on Maven Central.
          Hide
          kolais added a comment -

          Just reproduced this problem in 7.4.1 (using the code attached and a 5.7GB file I was trying to compress/decompress). 7.2.1 works fine. Shall the bug be re-opened?

          Show
          kolais added a comment - Just reproduced this problem in 7.4.1 (using the code attached and a 5.7GB file I was trying to compress/decompress). 7.2.1 works fine. Shall the bug be re-opened?
          Hide
          Christian Schlichtherle added a comment -

          What's your JRE?

          Show
          Christian Schlichtherle added a comment - What's your JRE?
          Hide
          Christian Schlichtherle added a comment -

          Verified using 7.4.2 on JDK 1.6.0_29.

          Show
          Christian Schlichtherle added a comment - Verified using 7.4.2 on JDK 1.6.0_29.
          Hide
          Christian Schlichtherle added a comment -

          This issue has been reintroduced in TrueZIP 7.3 and it affects JDK 1.7.0_01, too.

          Show
          Christian Schlichtherle added a comment - This issue has been reintroduced in TrueZIP 7.3 and it affects JDK 1.7.0_01, too.
          Hide
          Christian Schlichtherle added a comment -

          Changeset: 5d79860fecd3
          Author: Christian Schlichtherle <christian AT schlichtherle DOT de>
          Date: 2011-12-14 21:45
          Message: Fixed.
          Issue #TRUEZIP-139 - IOException when zipping/unzipping entries > 4GB

          Show
          Christian Schlichtherle added a comment - Changeset: 5d79860fecd3 Author: Christian Schlichtherle <christian AT schlichtherle DOT de> Date: 2011-12-14 21:45 Message: Fixed. Issue # TRUEZIP-139 - IOException when zipping/unzipping entries > 4GB
          Hide
          Christian Schlichtherle added a comment -

          Unfortunately, this issue results in a minor corruption of any archive file with an entry >= 4GB: The Data Descriptor and Central Directory Header will contain incorrect data and hence the classes de.schlichtherle.truezip.zip.ZipFile or java.util.zip.ZipFile will not be able to extract the respective entries.

          However, you can easily repair such an archive file by extracting it with a java.util.zip.ZipInputStream in JRE 7 (JRE 6 does not support ZIP64 extensions).

          Third party tools may also be able to recover the entries, but I haven't tested this.

          My heartiest apologies to anyone affected.

          Show
          Christian Schlichtherle added a comment - Unfortunately, this issue results in a minor corruption of any archive file with an entry >= 4GB: The Data Descriptor and Central Directory Header will contain incorrect data and hence the classes de.schlichtherle.truezip.zip.ZipFile or java.util.zip.ZipFile will not be able to extract the respective entries. However, you can easily repair such an archive file by extracting it with a java.util.zip.ZipInputStream in JRE 7 (JRE 6 does not support ZIP64 extensions). Third party tools may also be able to recover the entries, but I haven't tested this. My heartiest apologies to anyone affected.
          Hide
          kolais added a comment -

          Sorry for not answering your question promptly and many thanks for quick resolution of the issue

          Show
          kolais added a comment - Sorry for not answering your question promptly and many thanks for quick resolution of the issue

            People

            • Assignee:
              Christian Schlichtherle
              Reporter:
              dunder
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: