#file-checksum #crc #crc32 #file #crc64

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

#2120 in Algorithms

Download history 301/week @ 2023-12-17 42/week @ 2023-12-24 36/week @ 2023-12-31 335/week @ 2024-01-07 201/week @ 2024-01-14 58/week @ 2024-01-21 142/week @ 2024-01-28 134/week @ 2024-02-04 140/week @ 2024-02-11 201/week @ 2024-02-18 119/week @ 2024-02-25 123/week @ 2024-03-03 89/week @ 2024-03-10 100/week @ 2024-03-17 79/week @ 2024-03-24 160/week @ 2024-03-31

439 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