#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

#2807 in Algorithms

Download history 267/week @ 2024-11-15 252/week @ 2024-11-22 217/week @ 2024-11-29 193/week @ 2024-12-06 190/week @ 2024-12-13 38/week @ 2024-12-20 62/week @ 2024-12-27 192/week @ 2025-01-03 294/week @ 2025-01-10 288/week @ 2025-01-17 125/week @ 2025-01-24 297/week @ 2025-01-31 316/week @ 2025-02-07 275/week @ 2025-02-14 275/week @ 2025-02-21 223/week @ 2025-02-28

1,118 downloads per month
Used in 3 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