Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChecksumIEEE ¶
ChecksumIEEE returns the CRC-32 checksum of the given data. The algorithm is the one expected by Cassandra: the actual checksum is computed over the combination of 4 fixed initial bytes and the given byte slice.
func ChecksumKoopman ¶
ChecksumKoopman returns the CRC-24 checksum of the given data. The parameter bytes is an up to 8-byte register containing bytes to compute the CRC over; bits will be read least-significant to most significant. The parameter len is the number of bytes, greater than 0 and fewer than 9, to be read from bytes. The polynomial is chosen from https://users.ece.cmu.edu/~koopman/crc/index.html, by Philip Koopman, and is licensed under the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0). Koopman's own notation to represent the polynomial has been changed. This polynomial provides hamming distance of 8 for messages up to length 105 bits; we only support 8-64 bits at present, with an expected range of 40-48.
Types ¶
This section is empty.