Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crc-utils2

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crc-utils2

CRC Utils. Combines two or more CRC32 checksums into new one.

  • 0.9.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
3
Weekly downloads
 
Created
Source

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>

Keywords

FAQs

Package last updated on 19 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc