CRC16
Native node addon to calculate CRC16 values.
Installation
npm i crc16 --save
NOTE
If your intention is to use this to calculate redis slots then please use https://github.com/Salakar/cluster-key-slot - it's a pure JS implementation I wrote that is much faster than doing it natively.
Usage
CRC16(stringOrBuffer, [optional] encoding)
- stringOrBuffer: String or a buffer. If a string is provided it will automatically be converted to a buffer.
- encoding: Used for string to buffer conversion - only when a string is provided in
stringOrBuffer
var CRC16 = ;console;console; // calculate a redis hash slotconsole;
License
APACHE-2.0