Documentation ¶
Overview ¶
Package crc implements the checksum algorithm used throughout pebble.
The algorithm is CRC-32 with Castagnoli's polynomial, followed by a bit rotation and an additional delta. The additional processing is to lessen the probability of arbitrary key/value data coincidentally containing bytes that look like a checksum.
To calculate the uint32 checksum of some data:
var u uint32 = crc.New(data).Value()
In pebble, the uint32 value is then stored in little-endian format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.