[TRUEZIP-139] IOException when zipping/unzipping entries > 4GB Created: 19/Jul/11  Updated: 04/Jun/12  Resolved: 14/Dec/11

Status: Closed
Project: TrueZIP
Component/s: TrueZIP Driver ZIP
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

Type: Bug Priority: Critical
Reporter: dunder Assignee: Christian Schlichtherle
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes
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


Attachments: Java Source File Zipper.java    
Issue Links:
Duplicate
duplicates TRUEZIP-138 de.schlichtherle.truezip.zip.RawZipOu... Closed

 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)



 Comments   
Comment by Christian Schlichtherle [ 19/Jul/11 ]

Marked as duplicate.

Comment by Christian Schlichtherle [ 19/Jul/11 ]

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

Comment by kolais [ 14/Dec/11 ]

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?

Comment by Christian Schlichtherle [ 14/Dec/11 ]

What's your JRE?

Comment by Christian Schlichtherle [ 14/Dec/11 ]

Verified using 7.4.2 on JDK 1.6.0_29.

Comment by Christian Schlichtherle [ 14/Dec/11 ]

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

Comment by Christian Schlichtherle [ 14/Dec/11 ]

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

Comment by Christian Schlichtherle [ 14/Dec/11 ]

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.

Comment by kolais [ 19/Dec/11 ]

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





[TRUEZIP-138] de.schlichtherle.truezip.zip.RawZipOutputStream can't handle entries of 4GB size or larger Created: 18/Jul/11  Updated: 04/Jun/12  Resolved: 14/Dec/11

Status: Closed
Project: TrueZIP
Component/s: TrueZIP Driver ZIP
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

Type: Bug Priority: Critical
Reporter: Christian Schlichtherle Assignee: Christian Schlichtherle
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java(TM) SE Runtime Environment (build 1.7.0_01-b08) on Windows


Issue Links:
Duplicate
is duplicated by TRUEZIP-139 IOException when zipping/unzipping en... Closed

 Description   

This is a regression from TrueZIP 6. It has been introduced by refactoring the RawZipOutputStream.ZipDeflater class to benefit from the java.util.zip.Deflater API enhancements in JSE 5.

Unfortunately, java.util.zip.Deflater.getBytes(Read|Written) return long values, although their implementation in Sun's JDK 6 wraps at 4GB, which is why wrong data is written to the Central Directory entry.

This has been fixed by Oracle in JDK 7.



 Comments   
Comment by Christian Schlichtherle [ 18/Jul/11 ]

Fixed.

Comment by Christian Schlichtherle [ 14/Dec/11 ]

For details of reopening see #TRUEZIP-139

Comment by Christian Schlichtherle [ 14/Dec/11 ]

For information how to recover the entries of damaged archive files, please refer to #TRUEZIP-139





[TRUEZIP-137] FileEntry.createTempFile() selects default folder instead of current directory for temporary files Created: 15/Jul/11  Updated: 19/Jul/11  Resolved: 18/Jul/11

Status: Closed
Project: TrueZIP
Component/s: TrueZIP Driver FILE
Affects Version/s: TrueZIP 7.2
Fix Version/s: TrueZIP 7.2.1

Type: Bug Priority: Trivial
Reporter: Christian Schlichtherle Assignee: Christian Schlichtherle
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

... if the file entry is an entry in the current directory.



 Comments   
Comment by Christian Schlichtherle [ 18/Jul/11 ]

Fixed.





[TRUEZIP-135] de.schlichtherle.truezip.fs.archive.FsDefaultArchiveController should be package private Created: 13/Jul/11  Updated: 19/Jul/11  Resolved: 13/Jul/11

Status: Closed
Project: TrueZIP
Component/s: TrueZIP Kernel
Affects Version/s: TrueZIP 7.2
Fix Version/s: TrueZIP 7.2.1

Type: Improvement Priority: Trivial
Reporter: Christian Schlichtherle Assignee: Christian Schlichtherle
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks TRUEZIP-33 Support appending to archive files Closed
Tags: binary-compatibility

 Description   

This class was declared public because it was once believed that sub-classing it would be required to implement the "archive appending" feature. In that case, it were up to the archive driver implementation to select the right class.

This picture has changed, however. Selecting an archive entry collision strategy is now a matter of selecting the appropriate output preferences using TConfig.setOutputPreferences(...).

Hence, this class is not required to be public anymore. To the contrary, declaring it package private enables to do some required refactorings, hence this change.



 Comments   
Comment by Christian Schlichtherle [ 13/Jul/11 ]

Done.





Generated at Wed Sep 02 08:42:21 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.