crc32fast-lib
Fast, SIMD-accelerated CRC-32/ISO-HDLC (aka crc32
) checksum computation in Rust exposed as a C-compatible shared library.
Results in a dramatic performance improvement. For example, when using it via FFI in PHP, it's >10X faster than PHP's native crc32 implementation.
Changes
See the change log.
Usage
cargo build
will produce a shared library target (.so
on Linx, .dll
on Windows, .dylib
on macOS, etc) and a C header file.
Use the header file and library as you would normally when using a shared library in your language of choice.
PHP example
References
- crc32fast - The underlying Rust library which implemented this SIMD-accelerated approach.
- crc-fast-php - An implementation of this library in PHP using FFI.
- crc64fast-nvme - A similar project which computes CRC-64/NVME checksums at >20GiB/s, also with a C-compatible shared library.