| Crates.io | crc32c |
| lib.rs | crc32c |
| version | 0.6.8 |
| created_at | 2017-09-15 15:21:20.021596+00 |
| updated_at | 2024-06-09 17:15:44.323361+00 |
| description | Safe implementation for hardware accelerated CRC32C instructions with software fallback |
| homepage | https://github.com/zowens/crc32c |
| repository | https://github.com/zowens/crc32c |
| max_upload_size | |
| id | 31892 |
| size | 30,901 |
Rust implementation of the CRC-32-Castagnoli algorithm with hardware acceleration where possible.
Hardware acceleration on the following architectures:
cpuid is used to find the best implementation at runtime.All other processors utilize a software fallback.
First, add this to your Cargo.toml:
[dependencies]
crc32c = "0.6"
extern crate crc32c;
fn main() {
let message = b"Hello world!";
let crc = crc32c::crc32c(message);
println!("hash = {}", crc);
}
You may use this code under either the Apache 2.0 license or the MIT license, at your option.