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 232.
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 Copy for Crc
[src]
impl Default for Crc
[src]
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 !=
.
impl Eq for Crc
[src]
impl Hash for Crc
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more