[][src]Struct brotli2::raw::Decompress

pub struct Decompress { /* fields omitted */ }

In-memory state for decompressing brotli-encoded data.

This stream is at the heart of the I/O streams and is used to decompress an incoming brotli stream.

Methods

impl Decompress[src]

pub fn new() -> Decompress[src]

Creates a new brotli decompression/decoding stream ready to receive data.

pub fn decompress(
    &mut self,
    input: &mut &[u8],
    output: &mut &mut [u8]
) -> Result<DeStatus, Error>
[src]

Decompress some input data and write it to a buffer of output data.

This function will decompress the data in input and place the output in output, returning the result. Possible statuses that can be returned are that the stream is finished, more input is needed, or more output space is needed.

The input slice is updated to point to the remaining data that was not consumed, and the output slice is updated to point to the portion of the output slice that still needs to be filled in.

Errors

If the input stream is not a valid brotli stream, then an error is returned.

pub fn take_output(&mut self, size_limit: Option<usize>) -> Option<&[u8]>[src]

Retrieve a slice of the internal decompressor buffer up to size_limit in length (unlimited length if None), consuming it. As the internal buffer may not be contiguous, consecutive calls may return more output until this function returns None.

Trait Implementations

impl Drop for Decompress[src]

impl Sync for Decompress[src]

impl Send for Decompress[src]

Auto Trait Implementations

impl Unpin for Decompress

impl UnwindSafe for Decompress

impl RefUnwindSafe for Decompress

Blanket Implementations

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.

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

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

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