Skip to content

DeflateCRC32Stream is broken with NodeJS 15.6.0 #31

Closed
@xfournet

Description

@xfournet

Starting with NodeJS 15.6.0, calling end(chunk) on a DeflateCRC32Stream instance, the checksum is no more updated. This cause this bug archiverjs/node-archiver#491

const { DeflateCRC32Stream } = require('crc32-stream');

console.log('Node version:', process.version);
console.log();

const s = new DeflateCRC32Stream();
s.end(Buffer.from('hello world'));
console.log('crc32: ', s.hex());
console.log('rawSize: ', s.size(false));
Node version: v15.5.1

crc32:  0D4A1185
rawSize:  11
Node version: v15.6.0

crc32:  00000000
rawSize:  0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions