Skip to content

Commit f6c4a4c

Browse files
committed
Merge pull request #2 from petrosagg/master
Pass the encoding to the parent write()
2 parents 5fff7a7 + 1b4318c commit f6c4a4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/deflate-crc32-stream.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ DeflateCRC32Stream.prototype.push = function(chunk, encoding) {
3939
return zlib.DeflateRaw.prototype.push.call(this, chunk, encoding);
4040
};
4141

42-
DeflateCRC32Stream.prototype.write = function(chunk, cb) {
42+
DeflateCRC32Stream.prototype.write = function(chunk, enc, cb) {
4343
if (chunk) {
4444
this.checksum = crc32(chunk, this.checksum);
4545
this.rawSize += chunk.length;
4646
}
4747

48-
return zlib.DeflateRaw.prototype.write.call(this, chunk, cb);
48+
return zlib.DeflateRaw.prototype.write.call(this, chunk, enc, cb);
4949
};
5050

5151
DeflateCRC32Stream.prototype.digest = function() {
@@ -64,4 +64,4 @@ DeflateCRC32Stream.prototype.size = function(compressed) {
6464
} else {
6565
return this.rawSize;
6666
}
67-
};
67+
};

0 commit comments

Comments
 (0)