Type Alias DStream

Source
pub type DStream<'a> = DCtx<'a>;
Expand description

A Decompression stream.

Same as DCtx.

Aliased Type§

struct DStream<'a>(/* private fields */);

Implementations

Source§

impl<'a> DCtx<'a>

Source

pub fn decompress<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], ) -> SafeResult

Wraps the ZSTD_decompressDCtx() function.

Source

pub fn decompress_using_dict<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], dict: &[u8], ) -> SafeResult

Wraps ZSTD_decompress_usingDict

Source

pub fn decompress_using_ddict<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], ddict: &DDict<'_>, ) -> SafeResult

Wraps the ZSTD_decompress_usingDDict() function.

Source

pub fn init(&mut self) -> usize

Wraps the ZSTD_initCStream() function.

Initializes an existing DStream for decompression.

Source

pub fn reset(&mut self) -> SafeResult

Wraps the ZSTD_resetDStream() function.

Source

pub fn load_dictionary(&mut self, dict: &[u8]) -> SafeResult

Source

pub fn ref_ddict<'b>(&mut self, ddict: &DDict<'b>) -> SafeResult
where 'b: 'a,

Source

pub fn ref_prefix<'b>(&mut self, prefix: &'b [u8]) -> SafeResult
where 'b: 'a,

Source

pub fn set_parameter(&mut self, param: DParameter) -> SafeResult

Source

pub fn decompress_stream<C: WriteBuf + ?Sized>( &mut self, output: &mut OutBuffer<'_, C>, input: &mut InBuffer<'_>, ) -> SafeResult

Wraps the ZSTD_decompressStream() function.

Source

pub fn in_size() -> usize

Wraps the ZSTD_DStreamInSize() function.

Returns a hint for the recommended size of the input buffer for decompression.

Source

pub fn out_size() -> usize

Wraps the ZSTD_DStreamOutSize() function.

Returns a hint for the recommended size of the output buffer for decompression.

Source

pub fn sizeof(&self) -> usize

Wraps the ZSTD_sizeof_DCtx() function.

Source§

impl DCtx<'static>

Source

pub fn try_create() -> Option<Self>

Source

pub fn create() -> Self

Trait Implementations

Source§

impl Default for DCtx<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for DCtx<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for DCtx<'_>