#file-checksum #crc32 #crc64 #crc

checksum

Calculates crc32/crc64 file checksums written in Rust

3 unstable releases

Uses old Rust 2015

0.2.1 Dec 23, 2016
0.2.0 Apr 7, 2016
0.1.0 Feb 19, 2016

#2645 in Algorithms

Download history 120/week @ 2024-07-20 172/week @ 2024-07-27 76/week @ 2024-08-03 82/week @ 2024-08-10 70/week @ 2024-08-17 98/week @ 2024-08-24 124/week @ 2024-08-31 97/week @ 2024-09-07 98/week @ 2024-09-14 104/week @ 2024-09-21 144/week @ 2024-09-28 79/week @ 2024-10-05 73/week @ 2024-10-12 94/week @ 2024-10-19 119/week @ 2024-10-26 97/week @ 2024-11-02

390 downloads per month
Used in 2 crates

MIT license

7KB
203 lines

checksum-rs Build Status

Calculates CRC32/CRC64 file checksums written in Rust. CRC32 uses the IEEE polynomial 0xEDB88320 by default and CRC64 uses the ECMA polynomial 0xC96C5795D7870F42

Usage

extern crate checksum;
use checksum::crc::Crc as crc;
use std::env;

pub fn main() {
    let filename: &str = &env::args().nth(2).unwrap()[..];
    let mut crc = crc::new(filename);
    match crc.checksum() {
        Ok(checksum) => {
            println!("CRC32: {:X}", checksum.crc32);
            println!("CRC64: {:X}", checksum.crc64);
        }
        Err(e) => {
            println!("{}", e);
        }
    }
}

License

MIT

No runtime deps