srikanth-lingala / zip4j

A Java library for zip files and streams
Apache License 2.0
2k stars 307 forks source link

Compression Method "deflate (enhanced)" (deflate64) Unsupported #525

Open bmlong137 opened 7 months ago

bmlong137 commented 7 months ago

Large ZIP files (2+ GB) created by the built-in Windows ZIP tool will use deflate64 when creating those ZIP files. This is flat-out not supported by zip4j. It errors with the expected:

Caused by: net.lingala.zip4j.exception.ZipException: Unknown compression method
        at net.lingala.zip4j.model.enums.CompressionMethod.getCompressionMethodFromCode(CompressionMethod.java:52) ~[zip4j-2.10.0.jar:?]
        at net.lingala.zip4j.headers.HeaderReader.readLocalFileHeader(HeaderReader.java:539) ~[zip4j-2.10.0.jar:?]

This issue would only be resolved by adding support for that compression method.

bmlong137 commented 7 months ago

I am going to look into adding this feature myself.

bmlong137 commented 7 months ago

Here is a pull request with the feature added: https://github.com/srikanth-lingala/zip4j/pull/526