Skip to content

Commit

Permalink
fix DeflateCRC32Stream to support Node.js 15.6.0+ (archiverjs#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfournet committed Jan 28, 2021
1 parent 1c52608 commit be516ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/deflate-crc32-stream.js
Expand Up @@ -31,13 +31,13 @@ class DeflateCRC32Stream extends DeflateRaw {
return super.push(chunk, encoding);
}

write(chunk, enc, cb) {
_transform(chunk, encoding, callback) {
if (chunk) {
this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
this.rawSize += chunk.length;
}

return super.write(chunk, enc, cb);
super._transform(chunk, encoding, callback)
}

digest(encoding) {
Expand Down

0 comments on commit be516ce

Please sign in to comment.