Skip to content
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

bzip2 CRC error: incompatibility with command line bunzip2 v 1.0.6 #21

Open
hwinkler opened this issue Dec 31, 2018 · 1 comment
Open

Comments

@hwinkler
Copy link

hwinkler commented Dec 31, 2018

Using [email protected] and node v 11.4.0

compressjs.Bzip2 can produce output that the bunzip2 command line program, v 1.0.6 as distributed with Ubuntu 18.10, declares to have a CRC error.

The attached repro case compresses a large json file using Bzip2, once with blocksize 800k, and again with blocksize 900k.

bunzip2 of the compressed file of block size 800k succeeds.
bunzip2 of the compressed file of block size 900k fails.

error Error: Command failed: bunzip2 -t message.9.json.bz2
bunzip2: message.9.json.bz2: data integrity (CRC) error in data

To run the repro case, bunzip2 must be on your path. Then run

node index.js

repro.zip

@hwinkler
Copy link
Author

I should add that compressjs.Bzip2 decompresses the 900k buffer just fine. The issue here is compatibility with the popular command line tool. Not saying there's a bug in compressjs -- could be in the command line tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant