Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip archive throws invalid entry size #257

Closed
ndw opened this issue Apr 13, 2017 · 0 comments
Closed

Zip archive throws invalid entry size #257

ndw opened this issue Apr 13, 2017 · 0 comments

Comments

@ndw
Copy link
Owner

@ndw ndw commented Apr 13, 2017

From email:

When updating a zip archive the pxp:zip step throws in my XProc application a ZipException: invalid entry size (expected XX but got YY bytes)...

here a related description with the remark to not copy the ZipEntry in case the compression level might change:
https://bugs.openjdk.java.net/browse/JDK-6449882

I agree, it doesn't look perfect to set the compressed size to -1. But I think this just triggers an internal recalculation of the size. At least the resulting zip (resp. xlsx) files are not corrupted.

Line 235 in ZipOutputStream fixes the compressed size when closing the entry:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/zip/ZipOutputStream.java

ndw added a commit that referenced this issue Apr 13, 2017
ndw added a commit that referenced this issue Apr 13, 2017
ndw added a commit that referenced this issue Apr 13, 2017
@ndw ndw closed this Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.