包含计算各种形式的循环冗余校验码 (CRC) 的函数模板和类模板集合。
Daryle Walker
1.5
Boost 软件许可,版本 1.0
包含各种 CRC 计算函数、函数对象类型和封装策略类型的声明(和定义)。
![]() |
警告 |
---|---|
这些示例 CRC 计算器类型已经对照 参数化 CRC 算法目录进行了检查。如果我得到一个标准错误,则添加了新的类型别名。但是,错误的 |
![]() |
注意 |
---|---|
这里引用了 Rocksoft™ 模型 CRC 算法,如 Ross Williams 的 "CRC: 一篇关于 CRC 的论文" 中链接的 "A Painless Guide to CRC Error Detection Algorithms" 中所述。 在其他文档块中它将被缩写为“RMCA”。 |
BOOST_CRC_PARM_TYPE BOOST_CRC_OPTIMAL_NAME
namespace boost { template<std::size_t Bits> class crc_basic; template<std::size_t Bits, unspecified TruncPoly, unspecified InitRem, unspecified FinalXor, bool ReflectIn, bool ReflectRem> class crc_optimal; typedef crc_optimal< 16, 0x8005, 0, 0, true, true > crc_16_type; // Computation type for ARC|CRC-16|CRC-IBM|CRC-16/ARC|CRC-16/LHA standard. typedef crc_optimal< 16, 0x1021, 0xFFFF, 0, false, false > crc_ccitt_false_t; // Computation type for CRC-16/CCITT-FALSE standard. typedef crc_ccitt_false_t crc_ccitt_type; // Computation type for the CRC mistakenly called the CCITT standard. typedef crc_optimal< 16, 0x1021, 0, 0, true, true > crc_ccitt_true_t; typedef crc_optimal< 16, 0x8408, 0, 0, true, true > crc_xmodem_type; typedef crc_optimal< 16, 0x1021, 0, 0, false, false > crc_xmodem_t; // Computation type for the actual XMODEM|ZMODEM|CRC-16/ACORN standard. typedef crc_optimal< 32, 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true, true > crc_32_type; // Computation type for CRC-32|CRC-32/ADCCP|PKZIP standard. template<std::size_t Bits, unspecified TruncPoly, unspecified InitRem, unspecified FinalXor, bool ReflectIn, bool ReflectRem> unspecified crc(void const *, std::size_t); template<std::size_t Bits, unspecified TruncPoly> unspecified augmented_crc(void const *, std::size_t, unspecified = 0u); }