turbo-crc32

CRC32 generation using Slicing-by-N algorithm

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
turbo-crc32
1.0.15 years ago5 years agoMinified + gzip package size for turbo-crc32 in KB

Readme

turbo-crc32
Build Status npm node license downloads Coverage Status
CRC32 generation using Slicing-by-N algorithm. CRC32 and CRC32C algorithms are supported.

Support

Buy Me A Coffee

Usage

const crc32 = require('turbo-crc32/crc32');
const crc32c = require('turbo-crc32/crc32c');

crc32('123456789')  // 0xcbf43926
crc32c('123456789') // 0xe3069283

// if you want signed integer
crc32('123456789') >> 0 // -873187034

API

  • crc32(input: Buffer|String): Number
  • crc32c(input: Buffer|String): Number

Benchmark

nodejs 10.14.1 / Ubuntu 16.04 x64
buffer-crc32:   1387.205ms
crc:            987.866ms
turbo-crc32:    447.711ms

License

MIT, 2018 (c) Dmitriy Tsvettsikh