A 5-line* CRC64 implementation in Rust.
*: Yes, I cheated a bit. It is antirez' implementation of the CRC64 algorithm for Redis, which basically consists of one huge table. See lib.rs for the exact constants used. Oh, since v0.2.0 I cheated even more. It's not 5 lines anymore, more like 25.
cargo build --release
As a library:
use crc64::crc64; crc64::crc64(0, "123456789".as_bytes());
As a standalone application:
$ ./target/release/crc64 src/crc64/lib.rs
Run tests with:
If you find bugs or want to help otherwise, please open an issue.