crc-utils2
CRC Utils. Combines two or more CRC32 checksums into new one.
Last updated 13 years ago by kuebk .
Repository · Original npm · Tarball · package.json
$ cnpm install crc-utils2 
SYNC missed versions from official npm registry.

Node CRC32 Utils

Combines two or more CRC32 checksums into new one.

##How to build/install:

node-gyp configure build

or

npm install crc-utils

##Example:

var crcUtils = require('crc-utils');

// for crc32 checksum use lib: https://github.com/brianloveswords/buffer-crc32/
var crc32 = require('buffer-crc32');

var foo = new Buffer('foo');
var bar = new Buffer('bar');

var fooCrc32 = crc32(foo); // <Buffer 8c 73 65 21>
var barCrc32 = crc32(bar); // <Buffer 76 ff 8c aa>
 
var foobar = new Buffer('foobar');
var foobarCrc32 = crc32(foobar);

var foobarCrc32Combined = crcUtils.crc32_combine(
  fooCrc32.readUInt32BE(0), 
  barCrc32.readUInt32BE(0), 
  bar.length
); 

// CRC32 are the same but Endianness is prepared for GZIP format
console.log(foobarCrc32);         // <Buffer 9e f6 1f 95>
console.log(foobarCrc32Combined); // <Buffer 95 1f f6 9e>

Current Tags

  • 0.9.13                                ...           latest (13 years ago)

4 Versions

  • 0.9.13                                ...           13 years ago
  • 0.9.12                                ...           13 years ago
  • 0.9.11                                ...           13 years ago
  • 0.9.10                                ...           13 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |