bin+lib crc64

CRC64 checksum implementation

5 releases (2 stable)

2.0.0 Feb 27, 2022
1.0.0 Jan 7, 2016
0.2.2 Apr 3, 2015
0.2.1 Jan 23, 2015
0.2.0 Jan 23, 2015
Download history 10482/week @ 2024-06-12 6147/week @ 2024-06-19 6153/week @ 2024-06-26 7267/week @ 2024-07-03 7082/week @ 2024-07-10 7248/week @ 2024-07-17 5158/week @ 2024-07-24 6009/week @ 2024-07-31 8618/week @ 2024-08-07 6345/week @ 2024-08-14 5834/week @ 2024-08-21 7539/week @ 2024-08-28 7196/week @ 2024-09-04 7977/week @ 2024-09-11 6013/week @ 2024-09-18 4824/week @ 2024-09-25

27,884 downloads per month
Used in 14 crates (9 directly)

BSD-3-Clause

53KB
1K SLoC

CRC64

crates.io docs.rs docs License: MIT Build Status

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.

Build

cargo build --release

Usage

As a library:

crc64::crc64(0, "123456789".as_bytes());

CLI

Install as a standalone application:

cargo install crc64

Use it:

crc64 src/lib.rs

Tests

Run tests with:

cargo test

Contribute

If you find bugs or want to help otherwise, please open an issue.

License

BSD. See LICENSE.
Redis and the code I used is also released under a BSD license. See crc64.c.

No runtime deps