#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

#2230 in Algorithms

Download history 99/week @ 2024-03-13 76/week @ 2024-03-20 132/week @ 2024-03-27 100/week @ 2024-04-03 76/week @ 2024-04-10 88/week @ 2024-04-17 81/week @ 2024-04-24 139/week @ 2024-05-01 130/week @ 2024-05-08 128/week @ 2024-05-15 113/week @ 2024-05-22 116/week @ 2024-05-29 123/week @ 2024-06-05 98/week @ 2024-06-12 121/week @ 2024-06-19 101/week @ 2024-06-26

461 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