Since CRC is so widely used, I\'m surprised by having a hard time finding CRC implementations in C.
Is there a \"definitive\" CRC calculation snippet/algorithm for
Not sure about CRC-8 or CRC-16, but there is example CRC-32 code in RFC 1952. This RFC also references the V.42 standard, which describes a CRC-16 in section 8.1.1.6.
RFC 1952 also states:
If FHCRC is set, a CRC16 for the gzip header is present, immediately before the compressed data. The CRC16 consists of the two least significant bytes of the CRC32 for all bytes of the gzip header up to and not including the CRC16. [The FHCRC bit was never set by versions of gzip up to 1.2.4, even though it was documented with a different meaning in gzip 1.2.4.]
So there's your CRC-16 and CRC-32, potentially. (just take the two least significant bytes of the CRC-32, that is.)