[][src]Struct explode::ExplodeBuffer

pub struct ExplodeBuffer<'a> { /* fields omitted */ }

A handle to feed input to the decompressor.

This is the primary interface for low-level decompression. You can get an instance of this by providing an output buffer to Explode::with_buffer.

For a high-level example of how to use this interface, see Explode.

Implementations

impl<'a> ExplodeBuffer<'a>[src]

pub fn feed(&mut self, input: u8) -> Result<()>[src]

Feed in a byte input to decompress.

Signals a full output buffer by returning Ok(()). You can then get a reference to the full buffer with get, and reset the output buffer to empty with reset.

Note that you should feed in the same byte repeatedly to this function, until it signals it is ready for more input by returning Error::IncompleteInput. Doing anything else will result in a decompression failure or bad output.

pub fn get(&self) -> &[u8][src]

Get a reference to the filled portion of the output buffer.

This is usually called after feed returns Ok(()).

pub fn len(&self) -> usize[src]

Return the amount of output produced so far.

pub fn reset(&mut self)[src]

Reset the output buffer to empty.

Note that this does not reset the entire decompressor state.

pub fn done(&self) -> bool[src]

Returns true if decompression is finished.

This does the same thing as Explode::done but is usable while a ExplodeBuffer is still in scope.

Trait Implementations

impl<'a> Debug for ExplodeBuffer<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ExplodeBuffer<'a>

impl<'a> Send for ExplodeBuffer<'a>

impl<'a> Sync for ExplodeBuffer<'a>

impl<'a> Unpin for ExplodeBuffer<'a>

impl<'a> !UnwindSafe for ExplodeBuffer<'a>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.