The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CalcNextCRC16


Unit:SDL_dstruct
Class:none
Declaration:function CalcNextCRC16 (inbyte: byte; crc: word): word;

The function CalcNextCRC16 calculates the CRC-16 stream according to the following polynomial: X^16+X^12+X^5+1. The parameter inbyte contains the next byte to be encoded, the parameter crc holds the current CRC word. Please note that the CRC is calculated by a table-driven algorithm, which guarantees maximum speed (sacrificing speed to code size).

Hint: There are two slightly different CRC algorithms described in the literature which differ in the initialization. See CRC16ofBuffer for more information.


Last Update: 2023-Feb-06