-
Notifications
You must be signed in to change notification settings - Fork 85
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
CRC fails for streaming ZIP file if compression level set to 0 #98
Comments
Thanks for the bug report, I'll look into this in a few days. |
Haven't gotten a chance to check this out yet, but I should have time this weekend, sorry for the delay. |
If it helps, I switched to using i.e. this import { zip } from 'fflate'
zip({ ... }, (err, data) => { ... }) I also recall running into some (related?) issues at other compression levels with other files, but I forgot to keep notes. |
You mentioned it in your original issue, but it's kind of weird because |
I've finally been able to reproduce this error and will fix it as soon as possible. |
Well this was an incredibly stupid error - this package has been unable to do level-0 compression of files above 64kB since its release, it's just never been noticed because level-0 compression for ZIP files doesn't actually use DEFLATE level-0, and most files I tested were under 64kB. Thank you for this bug report, should be fixed in v0.7.2. |
How to reproduce
Zip the attached
truck.jpg
using the streaming ZIP interface with level set to 0. Try to extract it again using an off-the-shelf ZIP program.The problem
Both Windows Explorer and 7-ZIP reports a CRC error when trying to extract truck.jpg from the ZIP file. This doesn't seem to occur using the
zip()
interface nor at compression levels other than 0 (tried 1, 2, 6, 9). Also other files seem to work, there's something specific about this file and others.The text was updated successfully, but these errors were encountered: