Function Com_CRC() Foundation
Performs a Cyclic Redundancy Check for strings.
Com_CRC( <cString> , ;
[<nStart>] , ; // Default: 0
[<nPolynome>] ; // Default: 69665
) --> nCRCvalue
Returns a 16-bit CRC as a numeric value in the range between 0 and 65536.
Com_CRC() calculates a Cyclic Redundancy Check for a string. The parameter <nStart> can be used to set the start value for the calculation. <nPolynome> can be used to specify the polynome used for the CRC calculation.
Constant | Parameter | Polynome |
---|---|---|
Parity | 3 | 2^1 + 1 |
LCR_8 | 257 | 2^8 + 1 |
CRC_12 | 5011 | 2^12 + 2^11 + 2^3 + 2^2 + 2^1 + 1 |
CRC_16_X25 | 69665 | 2^16 + 2^12 + 2^5 + 1 |
CRC_16 | 98309 | 2^16 + 2^15 + 2^2 + 1 |
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.