[−][src]Struct explode::ExplodeBuffer
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,