Function adler::adler32[][src]

pub fn adler32<R: BufRead>(reader: R) -> Result<u32>
This is supported on crate feature std only.

Calculates the Adler-32 checksum of a BufRead’s contents.

The passed BufRead implementor will be read until it reaches EOF (or until it reports an error).

If you only have a Read implementor, you can wrap it in std::io::BufReader before calling this function.

Errors

Any error returned by the reader are bubbled up by this function.

Examples

use adler::adler32;

use std::fs::File;
use std::io::BufReader;

let file = File::open("input.txt")?;
let mut file = BufReader::new(file);

adler32(&mut file)?;