crcxx 0.2.0

universal slice-by-4/8/16/32 implementation of CRC-8/16/32/64 algorithms
Documentation

crcxx

Crate API License Build Status Windows Build Status

universal slice-by-4/8/16/32 implementation of CRC-8/16/32/64 algorithms.

Documentation

Usage

To use crcxx, add this to your Cargo.toml:

[dependencies]
crcxx = "0.2"

default slice-by-16 algorithm is used. You can change to slice-by-4/8/16/32:

crcxx = { version = "0.2", default-features = false, features = ["slice-by-8"] }

Example

use crcxx::crc16;

fn main() {
    // CRC-16/ARC
    let lut = crc16::crc16_make_sliced_lut(0x8005, true);

    let data = b"123456789";
    let crc = crc16::crc16_update_ref(0, data, &lut);

    println!("CRC: {:02X}", crc);
}

License

This project is licensed under the Apache 2.0 license