-
Notifications
You must be signed in to change notification settings - Fork 313
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
net.lingala.zip4j.exception.ZipException: invalid code lengths set #228
Comments
Which version of zip4j are you using? Would it be possible to attach the zip file? |
Hi, I am using 2.6.1. How can I send the password to you in private? Thank you! |
You can send me via email. My email is in the last section of ReadMe. |
I sent it to you. |
As mentioned in your post, the entry in this zip file is encrypted using Strong Encryption. Zip4j does not support Strong Encryption. Parts of this encryption are patented, and requires permission from PKWare. I will take this issue to improve zip4j's functionality to throw an exception with relevant message (that it is strong encrypted) instead of the exception message from your post. |
Can I use the test zip file you attached in a junit test case that I will add? If not, can you please create a zip with strong encryption that I can use for testing? This zip file will then be in the zip4j's repository here and will be used in a junit test. |
Sorry I cant allow you to put this file in public with its password :( I will look forward to get an other or create one. |
Code change with a better exception message is done. But I cannot push it without a test case. I will be looking forward for the test zip file. Thanks. |
Hi, I cannot add a file here. Dont know why. I will send this file via mail. |
Got it. Thanks. |
PKWARE provides its own pkzip util. It has trial period. Uzing it you can create zip with strong encryption on yor own. |
Issue fixed in v2.6.2 released today. |
Hi,
I cannot unzip files with following information (prodived by 7zip):
Method: pkAES-256 Deflate
Chraracteristics: 0xD StrongCrypto : Encrypt StrongCrypto
I will get the following stacktrace:
net.lingala.zip4j.exception.ZipException: java.io.IOException: java.util.zip.DataFormatException: invalid code lengths set at net.lingala.zip4j.tasks.AsyncZipTask.performTaskWithErrorHandling(AsyncZipTask.java:51) at net.lingala.zip4j.tasks.AsyncZipTask.execute(AsyncZipTask.java:38) at net.lingala.zip4j.ZipFile.extractFile(ZipFile.java:494) at net.lingala.zip4j.ZipFile.extractFile(ZipFile.java:460) at Main.main(Main.java:29) Caused by: java.io.IOException: java.util.zip.DataFormatException: invalid code lengths set at net.lingala.zip4j.io.inputstream.InflaterInputStream.read(InflaterInputStream.java:55) at net.lingala.zip4j.io.inputstream.ZipInputStream.read(ZipInputStream.java:141) at net.lingala.zip4j.io.inputstream.ZipInputStream.read(ZipInputStream.java:121) at net.lingala.zip4j.tasks.AbstractExtractFileTask.unzipFile(AbstractExtractFileTask.java:82) at net.lingala.zip4j.tasks.AbstractExtractFileTask.extractFile(AbstractExtractFileTask.java:64) at net.lingala.zip4j.tasks.ExtractFileTask.executeTask(ExtractFileTask.java:39) at net.lingala.zip4j.tasks.ExtractFileTask.executeTask(ExtractFileTask.java:21) at net.lingala.zip4j.tasks.AsyncZipTask.performTaskWithErrorHandling(AsyncZipTask.java:44) ... 4 more Caused by: java.util.zip.DataFormatException: invalid code lengths set at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:259) at net.lingala.zip4j.io.inputstream.InflaterInputStream.read(InflaterInputStream.java:45)
Thank you!
The text was updated successfully, but these errors were encountered: