16 const std::vector<uint8_t>&
data,
const uint16_t gen_pol)
23 const std::vector<uint8_t>&
data,
const uint32_t gen_pol)
30 const uint8_t*
data,
const size_t len_,
const uint16_t gen_pol)
42 abData[1] = abData[0];
47 uCrc16 = (uCrc16 & 0x7fff) << 1;
54 uCrc16 ^= (abData[0] | (abData[1] << 8));
59 unsigned long CRC32Value(
int i,
const uint32_t CRC32_POLYNOMIAL)
61 unsigned long ulCRC = i;
62 for (
int j = 8; j > 0; j--)
65 ulCRC = (ulCRC >> 1) ^ CRC32_POLYNOMIAL;
73 const uint8_t*
data,
const size_t len_,
const uint32_t gen_pol)
76 unsigned long ulCRC = 0;
79 unsigned long ulTemp1 = (ulCRC >> 8) & 0x00FFFFFFL;
80 unsigned long ulTemp2 =
82 ulCRC = ulTemp1 ^ ulTemp2;
#define ASSERT_(f)
Defines an assertion mechanism.
uint32_t compute_CRC32(const std::vector< uint8_t > &data, const uint32_t gen_pol=0xEDB88320L)
Computes the CRC32 checksum of a block of data.
unsigned long CRC32Value(int i, const uint32_t CRC32_POLYNOMIAL)
uint16_t compute_CRC16(const std::vector< uint8_t > &data, const uint16_t gen_pol=0x8005)
Computes the CRC16 checksum of a block of data.
static struct FontData data