CRC32C implementation with support for CPU-specific acceleration instructions (SSE 4.2) and software fallback.
To use crc32c-hw
, add this to your Cargo.toml
:
toml
[dependencies]
crc32c-hw = "0.1.3"
```rust extern crate crc32c_hw;
let mut crc = 0; crc = crc32chw::update(crc, b"123"); crc = crc32chw::update(crc, b"456"); crc = crc32chw::update(crc, b"789"); asserteq!(crc, 0xe3069283);
asserteq!(crc32chw::compute(b"123456789"), 0xe3069283); ```
Distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, and LICENSE-MIT for details.