Crates.io | adler32_checksum_rs |
lib.rs | adler32_checksum_rs |
version | 0.1.0 |
source | src |
created_at | 2023-03-07 14:27:28.348945 |
updated_at | 2023-03-07 14:27:28.348945 |
description | Adler32 checksum |
homepage | |
repository | https://github.com/Derghust/adler32_checksum_rs |
max_upload_size | |
id | 803620 |
size | 13,249 |
Adler 32 checksum algorithm written for rust.
fn adler32_checksum_blocking(init: [u8; 8], data: Vec<u8>) -> Adler32Result {
let adler = Adler32::new(init);
adler.adler32_checksum(data);
}
fn adler32_checksum_blocking(init: [u8; 8], data: Vec<Vec<u8>>) -> Vec<Adler32Result> {
let adler = Adler32::new(init);
data
.iter()
.map(|hash| {
adler.adler32_checksum(hash);
})
.collect();
}
fn adler32_checksum_parallel(init: [u8; 8], data: Vec<Vec<u8>>) -> Vec<Adler32Result> {
Adler32Builder::new(Adler32::new(init))
.push_vec(data)
.finalize();
}