-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Compression level 3 has bugs? #22
Comments
Do you have any example ? I tried to reproduce it with zip -3 without luck. |
try data with chars > 0x255 |
Found the bug. When changing the zip_DEFAULT_LEVEL (in jszip-deflate.js) from 6 to a value <= 3, the following test case fails. test("DEFLATE should not change the content", function(){
var string = "test";
var zip = new JSZip();
zip.file("test.txt", string);
var reloadedZip = new JSZip(zip.generate({base64:false,compression:'DEFLATE'}));
equals(reloadedZip.file("test.txt").data, string);
}); In the file jszip-deflate.js, there are two The work-around is to keep the zip_DEFAULT_LEVEL above 3. |
Fixed in #56 |
Inflating a string that was deflated using lvl3 compression will duplicate the last character. It will also, once in a blue moon, produce an output that can't be inflated (it crashes the .net deflatestream).
The text was updated successfully, but these errors were encountered: