[][src]Struct inflate::InflateStream

pub struct InflateStream { /* fields omitted */ }

Methods

impl InflateStream[src]

pub fn new() -> InflateStream[src]

Create a new stream for decoding raw deflate encoded data.

pub fn from_zlib() -> InflateStream[src]

Create a new stream for decoding deflate encoded data with a zlib header and footer

pub fn from_zlib_no_checksum() -> InflateStream[src]

Create a new stream for decoding deflate encoded data with a zlib header and footer

This version creates a decoder that does not checksum the data to validate it with the checksum provided with the zlib wrapper.

pub fn reset(&mut self)[src]

pub fn reset_to_zlib(&mut self)[src]

pub fn update<'a>(
    &'a mut self,
    data: &[u8]
) -> Result<(usize, &'a [u8]), String>
[src]

Try to uncompress/decode the data in data.

On success, returns how many bytes of the input data was decompressed, and a reference to the buffer containing the decompressed data.

This function may not uncompress all the provided data in one call, so it has to be called repeatedly with the data that hasn't been decompressed yet as an input until the number of bytes decoded returned is 0. (See the top level crate documentation for an example.)

Errors

If invalid input data is encountered, a string describing what went wrong is returned.

pub fn current_checksum(&self) -> u32[src]

Returns the calculated checksum value of the currently decoded data.

Will return 0 for cases where the checksum is not validated.

Auto Trait Implementations

impl Send for InflateStream

impl Unpin for InflateStream

impl Sync for InflateStream

impl UnwindSafe for InflateStream

impl RefUnwindSafe for InflateStream

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]