35 for (
int i = 0; i < 256; i++)
40 for (
int i = 0; i < 256; i++)
42 for (
int j = 7;
j >= 0;
j--)
133 for (
int i = 0; i < 256; ++i)
136 for (
int j = 0;
j < 8; ++
j)
140 crc = (
crc >> 1) ^ 0x8408;
226 for (
int i = 0; i < 256; ++i)
229 for (
int j = 0;
j < 8; ++
j)
233 crc = (
crc >> 1) ^ 0xEDB88320;
16 位循环冗余校验(CRC-16)计算类 / CRC-16 checksum computation class
static bool Verify(const void *raw, size_t len)
验证数据的 CRC16 校验码 / Verifies the CRC16 checksum of the given data
static uint16_t Calculate(const void *raw, size_t len)
计算数据的 CRC16 校验码 / Computes the CRC16 checksum for the given data
static bool inited_
查找表是否已初始化 / Whether the lookup table is initialized
static void GenerateTable()
生成 CRC16 查找表 / Generates the CRC16 lookup table
static uint16_t tab_[256]
CRC16 查找表 / CRC16 lookup table.
static const uint16_t INIT
CRC16 初始值 / CRC16 initial value.
32 位循环冗余校验(CRC-32)计算类 / CRC-32 checksum computation class
static bool inited_
查找表是否已初始化 / Whether the lookup table is initialized
static uint32_t Calculate(const void *raw, size_t len)
计算数据的 CRC32 校验码 / Computes the CRC32 checksum for the given data
static const uint32_t INIT
CRC32 初始值 / CRC32 initial value.
static uint32_t tab_[256]
CRC32 查找表 / CRC32 lookup table.
static bool Verify(const void *raw, size_t len)
验证数据的 CRC32 校验码 / Verifies the CRC32 checksum of the given data
static void GenerateTable()
生成 CRC32 查找表 / Generates the CRC32 lookup table
8 位循环冗余校验(CRC-8)计算类 / CRC-8 checksum computation class
static const uint8_t INIT
CRC8 初始值 / CRC8 initial value.
static void GenerateTable()
生成 CRC8 查找表 / Generates the CRC8 lookup table
static bool inited_
查找表是否已初始化 / Whether the lookup table is initialized
static uint8_t Calculate(const void *raw, size_t len)
计算数据的 CRC8 校验码 / Computes the CRC8 checksum for the given data
static uint8_t tab_[256]
CRC8 查找表 / CRC8 lookup table.
static bool Verify(const void *raw, size_t len)
验证数据的 CRC8 校验码 / Verifies the CRC8 checksum of the given data
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值