crc32-universal
CRC32 slice-by-16 implementation in JS with an optional native binding to speed it up even futher
Last updated 3 years ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install crc32-universal 
SYNC missed versions from official npm registry.

crc32-universal

CRC32 slice-by-16 implementation in JS with an optional native binding to speed it up even futher. When used with Webpack/Browserify etc, it bundles the JS version.

npm install crc32-universal

JS version is provided by https://gist.github.com/101arrowz/e58695f7ccfdf74f60ba22018093edea (thank you to @andrewosh for finding that) and the C version is provided by https://github.com/stbrumme/crc32.

For payloads smaller than 256 bytes the JS version is always used as that's faster than context switching to C (Javascript is really fast!).

PR welcome that support the SSE4/Neon optimisations for Intel/ARM for even faster speedup.

Usage

const crc32 = require('crc32-universal')
const uint = crc32(Buffer.from('hello'))
console.log(uint) // 907060870

License

MIT

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

1 Versions

  • 1.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE