-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Flawed ZLib inflateRaw output #7625
Comments
Your are confusing zlib(gzip) with zip (pkzip). You hashes only are correct when unzip with pkzip not zlib. zlib mearly compresses or uncompress while zip also is a container. Perhaps node-zip can do what you'd like: It is the difference between: https://en.wikipedia.org/wiki/ZIP_(file_format) |
I was saying zlib doen't handle zip archives. I think I was confused because of the uploaded file compress.zip. Sorry to add to the confusion. I've tried this on node v15.0.1 by itself (not as part of nwjs), and it works correctly, so it seems to specifically be a nwjs issue. |
I had errors so I fabricated zip file so I can verify is deflate working. I was able extract data with other zip programs. but NWJS ZLIB was not able extract it it. I updated my first comment. Sorry for confusion. |
Thanks for reporting. Fixed in https://dl.nwjs.io/live-build/nw50/20201124-151641/caac9e090/v0.50.1/ |
NWJS Version : 0.49.2 & 0.50.0
Operating System : Linux x64
Expected behavior
inflate should be able extract deflate streams without losses
Actual behavior
I used SHA1 hashes since SHA was created for verify data integrity.
Input data before deflate
1a152d782882a65a39249fd655bfa7ad92746097
output data after deflate
d2aaec6e14bf9aca9f805f37eab0e5d1f0042ef4
compressed data
output data hash after inflate
c27789e1480426147283ec99d2b3e21f224c77b6
When you look data there seems to be data loss middle of the extracted data filled with 00 bytes
How to reproduce
->
The text was updated successfully, but these errors were encountered: