Skip to main content

crc32

Constants

crc_table : Uint32Array

Functions

update_crc(crc, buf, offset, len)number

Update a running CRC with the bytes buf[0..len-1]--the CRC should be initialized to all 1's, and the transmitted value is the 1's complement of the final running CRC (see the crc32() routine below)).

crc32(buffer, offset, length)number

32-bit cyclic redundancy checksum Returns CRC of the bytes buf[0..len-1]

crc_table : Uint32Array

Kind: global constant

update_crc(crc, buf, offset, len) ⇒ number

Update a running CRC with the bytes buf[0..len-1]--the CRC should be initialized to all 1's, and the transmitted value is the 1's complement of the final running CRC (see the crc32() routine below)).

Kind: global function

ParamType
crcnumber
bufUint8Array
offsetnumber
lennumber

crc32(buffer, offset, length) ⇒ number

32-bit cyclic redundancy checksum Returns CRC of the bytes buf[0..len-1]

Kind: global function
See: https://en.wikipedia.org/wiki/Cyclic_redundancy_check

ParamTypeDescription
bufferUint8Arraybyte buffer
offsetnumber
lengthnumberhow many bytes to include in checksum calculation