Node CRC32 Utils
Combines two or more CRC32 checksums into new one.
##How to install:
npm install @balena/node-crc-utils
##How to build:
Install emscripten, clone this repo then
npm run build
##Example:
const crcUtils = require('@balena/node-crc-utils');
const crc32 = require('buffer-crc32');
const foo = Buffer.from('foo');
const bar = Buffer.from('bar');
const fooCrc32 = crc32(foo);
const barCrc32 = crc32(bar);
const foobar = Buffer.from('foobar');
const foobarCrc32 = crc32(foobar);
crcUtils.ready.then(() => {
const foobarCrc32Combined = crcUtils.crc32_combine(
fooCrc32.readUInt32BE(0),
barCrc32.readUInt32BE(0),
bar.length
);
console.log(foobarCrc32);
console.log(foobarCrc32Combined);
});