Glavo opened a new pull request, #334: URL: https://github.com/apache/commons-compress/pull/334
Since the zip central directory is at the file end, we can splice other content before the zip file. As an example, in Java 9 and above, the `$JAVA_HOME/jmods` folder contains some files with the extension `jmod`. The jmod file is a normal zip file, but the file starts with the four-byte magic number `0x4A 0x4D 0x01 0x00`. Another example, [Ammonite Shell](http://ammonite.io/) splices a bash shell script before the jar file, looks for Java through the bash shell script and starts itself. `java.util.zip.ZipFile` reads these files correctly, but `org.apache.commons.compress.archivers.zip.ZipFile` recognizes them as empty zip files. This PR fixes this issue and allows users to read content before the zip body. I didn't implement it for zip64 because `java.util.zip.ZipFile` didn't implement it either, and I'm not sure how it should be implemented correctly. (I seem to have missed the release date of commons-compress 1.22. This problem has a wider impact, and I hope to fix it as soon as possible.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
