Documentation
¶
Overview ¶
Package crc16 implements the 16-bit cyclic redundancy check, or CRC-16, checksum. See https://en.wikipedia.org/wiki/Cyclic_redundancy_check for information.
The fitTable and compute algorithm that are used to compute the CRC-16 checksum is belong to Garmin or its affiliates and the usage of this package should comply with their terms and conditions. The Authors doesn't own any of those materials except only the code implementation in go.
Index ¶
Constants ¶
const (
Size = 2 // An uint16 requires 2 bytes to be represented in its binary form.
)
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new hash.Hash16 computing the CRC-16 checksum using the polynomial represented by the Table. The computing algorithm is using Fit algorithm defined in [https://developer.garmin.com/fit/protocol]. Its Sum method will lay the value out in big-endian byte order.
Types ¶
type Table ¶
type Table [16]uint16
Table is [16]uint16
func MakeFitTable ¶
func MakeFitTable() *Table
MakeFitTable is the table defined in [https://developer.garmin.com/fit/protocol]