rust-crc32
Calculate CRC-32 checksum for binary data.
How to install
How to use
use crc32;
Memo
It provides three methods for calculating CRC32:
- crc32basic() — A simple and easy-to-understand implementation.
- crc32() — An optimized version of
crc32basic()designed to improve processing speed. - crc32speed() — A highly optimized implementation focused on maximum performance.
When processing data up to 100 KB, crc32 is the fastest. However, for data larger than 1 MB, all implementations reach the limitations of memory bandwidth, so the differences between algorithms become less noticeable.
Streaming API
You can calculate CRC32 in a streaming manner using the Crc32Stream struct:
use Crc32Stream;