Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32, checksum. See http://en.wikipedia.org/wiki/Cyclic_redundancy_check for information.
Polynomials are represented in LSB-first form also known as reversed representation.
In the call graph viewer below, each node is a function belonging to this package and its children are the functions it calls—perhaps dynamically.
The root nodes are the entry points of the package: functions that may be called from outside the package. There may be non-exported or anonymous functions among them if they are called dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring
Functions may be omitted if they were determined to be unreachable in the particular programs or tests that were analyzed.
const ( // IEEE is by far and away the most common CRC-32 polynomial. // Used by ethernet (IEEE 802.3), v.42, fddi, gzip, zip, png, ... IEEE = 0xedb88320 // Castagnoli's polynomial, used in iSCSI. // Has better error detection characteristics than IEEE. // http://dx.doi.org/10.1109/26.231911 Castagnoli = 0x82f63b78 // Koopman's polynomial. // Also has better error detection characteristics than IEEE. // http://dx.doi.org/10.1109/DSN.2002.1028931 Koopman = 0xeb31d82e )
const Size = 4
The size of a CRC-32 checksum in bytes.
var IEEETable = makeTable(IEEE)
IEEETable is the table for the IEEE polynomial.
Checksum returns the CRC-32 checksum of data using the polynomial represented by the Table.
ChecksumIEEE returns the CRC-32 checksum of data using the IEEE polynomial.
New creates a new hash.Hash32 computing the CRC-32 checksum using the polynomial represented by the Table.
NewIEEE creates a new hash.Hash32 computing the CRC-32 checksum using the IEEE polynomial.
Update returns the result of adding the bytes in p to the crc.
type Table uint32
Table is a 256-word table representing the polynomial for efficient processing.
MakeTable returns the Table constructed from the specified polynomial.