Struct Decoder

struct Decoder<'a> { ... }

An in-memory decoder for streams of data.

Implementations

impl Decoder<'static>

fn new() -> Result<Self>

Creates a new decoder.

fn with_dictionary(dictionary: &[u8]) -> Result<Self>

Creates a new decoder initialized with the given dictionary.

impl<'a> Decoder<'a>

fn with_context(context: &'a mut DCtx<'static>) -> Self

Creates a new decoder which employs the provided context for deserialization.

fn with_prepared_dictionary<'b>(dictionary: &DecoderDictionary<'b>) -> Result<Self>
where
    'b: 'a

Creates a new decoder, using an existing DecoderDictionary.

fn with_ref_prefix<'b>(ref_prefix: &'b [u8]) -> Result<Self>
where
    'b: 'a

Creates a new decoder, using a ref prefix

fn set_parameter(self: &mut Self, parameter: DParameter) -> Result<()>

Sets a decompression parameter for this decoder.

impl Operation for Decoder<'_>

fn run<C: WriteBuf + ?Sized>(self: &mut Self, input: &mut InBuffer<'_>, output: &mut OutBuffer<'_, C>) -> Result<usize>
fn flush<C: WriteBuf + ?Sized>(self: &mut Self, output: &mut OutBuffer<'_, C>) -> Result<usize>
fn reinit(self: &mut Self) -> Result<()>
fn finish<C: WriteBuf + ?Sized>(self: &mut Self, _output: &mut OutBuffer<'_, C>, finished_frame: bool) -> Result<usize>

impl<'a> Freeze for Decoder<'a>

impl<'a> RefUnwindSafe for Decoder<'a>

impl<'a> Send for Decoder<'a>

impl<'a> Sync for Decoder<'a>

impl<'a> Unpin for Decoder<'a>

impl<'a> UnsafeUnpin for Decoder<'a>

impl<'a> UnwindSafe for Decoder<'a>

impl<T> Any for Decoder<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Decoder<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Decoder<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for Decoder<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Decoder<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Decoder<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Decoder<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>