diff --git a/lib/deflate-crc32-stream.js b/lib/deflate-crc32-stream.js index 82fe1c8c..8804c128 100644 --- a/lib/deflate-crc32-stream.js +++ b/lib/deflate-crc32-stream.js @@ -39,13 +39,13 @@ DeflateCRC32Stream.prototype.push = function(chunk, encoding) { return zlib.DeflateRaw.prototype.push.call(this, chunk, encoding); }; -DeflateCRC32Stream.prototype.write = function(chunk, cb) { +DeflateCRC32Stream.prototype.write = function(chunk, enc, cb) { if (chunk) { this.checksum = crc32(chunk, this.checksum); this.rawSize += chunk.length; } - return zlib.DeflateRaw.prototype.write.call(this, chunk, cb); + return zlib.DeflateRaw.prototype.write.call(this, chunk, enc, cb); }; DeflateCRC32Stream.prototype.digest = function() { @@ -64,4 +64,4 @@ DeflateCRC32Stream.prototype.size = function(compressed) { } else { return this.rawSize; } -}; \ No newline at end of file +};