regular / unbzip2-stream

streaming unbzip2 implementatio in pure javascript for node and browsers
Other
29 stars 23 forks source link

Empty bzipped file throws crc error #31

Closed LaurensRietveld closed 4 years ago

LaurensRietveld commented 4 years ago

When unzipping an empty bzip file, you'd get a crc32 do not match error. To reproduce:

Create empty bz2 file:

touch empty && bzip2 -c empty > empty.bz2

Run following script:

const fs = require('fs')
const bz2 = require('unbzip2-stream')

fs.createReadStream('./empty.bz2').pipe(bz2()).pipe(process.stdout);
regular commented 4 years ago

Should be fixed in 1.4.0