2 releases
0.1.1 | Jan 19, 2024 |
---|---|
0.1.0 | Jan 19, 2024 |
#2678 in Algorithms
68 downloads per month
6KB
56 lines
rust-crc32
Calculate CRC-32 checksum for binary data.
How to install
cargo add crc32_light
How to use
use crc32_light::crc32;
fn main() {
let crc = crc32(b"dog");
println!("CRC32 = 0x{:08x}", crc);
}
lib.rs
:
Calculate CRC32 checksum for binary data.
Examples
assert_eq!(crc32(b"cat"), 0x9E5E43A8);
assert_eq!(crc32(b"dog"), 0x812C397D);