Merge pull request #603 from lefela4/patch-1

Update compression.js
This commit is contained in:
Romain Beaumont 2018-12-02 18:56:53 +01:00 committed by GitHub
commit 3326329f37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ class Decompressor extends Transform {
this.push(chunk.slice(size))
return cb()
} else {
zlib.inflate(chunk.slice(size), (err, newBuf) => {
zlib.unzip(chunk.slice(size), { finishFlush: zlib.constants.Z_SYNC_FLUSH }, (err, newBuf) => { /** Fix by lefela4. */
if (err) {
if (!this.hideErrors) {
console.error('problem inflating chunk')