Struct gzip_header::Crc
[−]
[src]
pub struct Crc { /* fields omitted */ }
A wrapper struct containing a CRC checksum in the format used by gzip and the amount of bytes input to it mod 2^32.
Methods
impl Crc
[src]
fn new() -> Crc
Create a new empty CRC struct.
fn with_initial(checksum: u32, amount: u32) -> Crc
fn sum(&self) -> u32
Return the current checksum value.
fn amt_as_u32(&self) -> u32
Return the number of bytes input.
fn update(&mut self, data: &[u8])
Update the checksum and byte counter with the provided data.
fn reset(&mut self)
Reset the checksum and byte counter.
Trait Implementations
impl Debug for Crc
[src]
impl Clone for Crc
[src]
fn clone(&self) -> Crc
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Crc
[src]
fn eq(&self, __arg_0: &Crc) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Crc) -> bool
This method tests for !=
.