Namespace: go.std.hash.crc32
v1.0Contents
Summary
Provides a low-level interface to the hash/crc32 package.
Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32,
checksum. See https://en.wikipedia.org/wiki/Cyclic_redundancy_check for
information.
Polynomials are represented in LSB-first form also known as reversed representation.
See https://en.wikipedia.org/wiki/Mathematics_of_cyclic_redundancy_checks#Reversed_representations_and_reciprocal_polynomials
for information.
Index
- *Table
- Castagnoli
- Checksum
- ChecksumIEEE
- IEEE
- IEEETable
- Koopman
- MakeTable
- New
- NewIEEE
- Size
- Table
- Update
- arrayOfTable
Legend
- 
      Constant
      Variable
      Function
      Macro
      Special form
      Type
      GoVar
      Receiver/Method
    
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.- 
  CastagnoliInt v1.0Castagnoli's polynomial, used in iSCSI. 
 Has better error detection characteristics than IEEE.
 https://dx.doi.org/10.1109/26.231911
 
- 
  IEEEInt v1.0IEEE is by far and away the most common CRC-32 polynomial. 
 Used by ethernet (IEEE 802.3), v.42, fddi, gzip, zip, png, ...
 
- 
  KoopmanInt v1.0Koopman's polynomial. 
 Also has better error detection characteristics than IEEE.
 https://dx.doi.org/10.1109/DSN.2002.1028931
 
- 
  SizeInt v1.0The size of a CRC-32 checksum in bytes. 
 
Variables
- 
  IEEETableVar v1.0IEEETable is the table for the IEEE polynomial. 
 
Functions, Macros, and Special Forms
- 
  ChecksumFunction v1.0(Checksum data tab)Checksum returns the CRC-32 checksum of data 
 using the polynomial represented by the Table.
 
 Go input arguments: (data []byte, tab *Table)
 
 Go returns: uint32
 
 Joker input arguments: [^arrayOfByte data, ^*Table tab]
 
 Joker returns: ^Number
- 
  ChecksumIEEEFunction v1.0(ChecksumIEEE data)ChecksumIEEE returns the CRC-32 checksum of data 
 using the IEEE polynomial.
 
 Go input arguments: (data []byte)
 
 Go returns: uint32
 
 Joker input arguments: [^arrayOfByte data]
 
 Joker returns: ^Number
- 
  MakeTableFunction v1.0(MakeTable poly)MakeTable returns a Table constructed from the specified polynomial. 
 The contents of this Table must not be modified.
 
 Go input arguments: (poly uint32)
 
 Go returns: *Table
 
 Joker input arguments: [^Number poly]
 
 Joker returns: ^*Table
- 
  NewFunction v1.0(New tab)New creates a new hash.Hash32 computing the CRC-32 checksum using the 
 polynomial represented by the Table. Its Sum method will lay the
 value out in big-endian byte order. The returned Hash32 also
 implements encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to
 marshal and unmarshal the internal state of the hash.
 
 Go input arguments: (tab *Table)
 
 Go returns: hash.Hash32
 
 Joker input arguments: [^*Table tab]
 
 Joker returns: ^go.std.hash/Hash32
- 
  NewIEEEFunction v1.0(NewIEEE)NewIEEE creates a new hash.Hash32 computing the CRC-32 checksum using 
 the IEEE polynomial. Its Sum method will lay the value out in
 big-endian byte order. The returned Hash32 also implements
 encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to marshal
 and unmarshal the internal state of the hash.
 
 Go returns: hash.Hash32
 
 Joker input arguments: []
 
 Joker returns: ^go.std.hash/Hash32
- 
  UpdateFunction v1.0(Update crc tab p)Update returns the result of adding the bytes in p to the crc. 
 
 Go input arguments: (crc uint32, tab *Table, p []byte)
 
 Go returns: uint32
 
 Joker input arguments: [^Number crc, ^*Table tab, ^arrayOfByte p]
 
 Joker returns: ^Number
Types
- 
  *TableConcrete Type v1.0Table is a 256-word table representing the polynomial for efficient processing. 
 
- 
  TableConcrete Type v1.0Table is a 256-word table representing the polynomial for efficient processing. 
 
- 
  arrayOfTableConcrete Type v1.0Table is a 256-word table representing the polynomial for efficient processing.