From be516ce9f5470fdbf59f2b865da14afb54f4a4c9 Mon Sep 17 00:00:00 2001 From: Xavier Fournet <461943+xfournet@users.noreply.github.com> Date: Thu, 28 Jan 2021 23:32:05 +0100 Subject: [PATCH] fix DeflateCRC32Stream to support Node.js 15.6.0+ (#31) --- lib/deflate-crc32-stream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/deflate-crc32-stream.js b/lib/deflate-crc32-stream.js index ffe7661..899315e 100644 --- a/lib/deflate-crc32-stream.js +++ b/lib/deflate-crc32-stream.js @@ -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) {