-
Notifications
You must be signed in to change notification settings - Fork 30.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
ZLIB failing to inflate entire .gz file that contains an extra field in the header #6116
Comments
@chmille4 Do you have tried with file stream though? |
@yorkie I don't quite understand. Can you give me an example of what you mean? Thanks |
I mean you should select single variable when evaluating a result, you are using
If the above steps are working correctly, this issue might not be caused by |
Here's the script: var zlib = require('zlib');
process.stdin.pipe(zlib.createGunzip()).pipe(process.stdout); |
@chmille4 Can you try with node v5.10.1 and the master branch if that doesn't work? I know there were some zlib-related changes recently, some of which are in v5.x and some that are not yet. |
Yep, upgrading to v5.10.1. Fixed the issue. Awesome, thanks for the help! |
The Node ZLIB library only inflates the first 64k of a gzipped file (attached). The file has an extra field in the header, which may be causing the problem. GUNZIP on mac and linux correctly inflate it to it's full size (~33M). I've also attached a simple test script which takes the gzip file on stdin and outputs the inflated file to stdout. If you run the test script with the attached gzip file you should get 33M but you only get 64K of data.
zlib_test.js.zip
IDb.part1.gz
Note: the attached gzip file has been sliced to make it smaller so that I could upload it here. Therefore gunzip will complain and say "unexpected end of input", however this file is displaying the same behavior as the original larger gzip file.
The text was updated successfully, but these errors were encountered: