Cyclic Redundancy Check - 32-bit
A simple CRC32 module that implements the 32-bit cyclic redundancy check, or CRC-32, checksum. This module operates at top performance speed with no dependencies.
Installation:
npm i faster-crc32
Usage
const CRC32 = path = ; console;
Construction
:
const filename = './path/to/file.png';const options = chunkSize: CRC32MB encoding: CRC32HEX; const crc = filename options ; crc ;
Returns
: Array
Values
: UInt32
, HEX
, OCTAL
, DECIMAL
, BINARY
Calculation sizes:
CRC32.WHOLE
- calculates hash on entire file
CRC32.B
- calculates hash on each byte
CRC32.KB
- calculates hash on each kilobyte
CRC32.MB
- calculates hash on each megabyte
CRC32.GB
- calculates hash on each gigabyte
Calculation outputs:
CRC32.BINARY
= sets output to binary
CRC32.OCTAL
= sets output to octal
CRC32.DECIMAL
= sets output to decimal
CRC32.HEX
= sets output to hex
CRC32.INT
= sets output to int
CLI:
CRC32 ./path/to/file.png