[][src]Struct zstd_safe::DCtx

pub struct DCtx<'a>(_, _);

A Decompression Context.

The lifetime references the potential dictionary used for this context.

If no dictionary was used, it will most likely be 'static.

Same as DStream.

Implementations

impl DCtx<'static>[src]

pub fn create() -> Self[src]

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

pub fn decompress(&mut self, dst: &mut [u8], src: &[u8]) -> SafeResult[src]

Wraps the ZSTD_decompressDCtx() function.

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

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

Wraps the ZSTD_decompress_usingDDict() function.

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

Wraps the ZSTD_initCStream() function.

Initializes an existing DStream for decompression.

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

👎 Deprecated

Wraps the ZSTD_initDStream_usingDict() function.

pub fn init_using_ddict<'b>(&mut self, ddict: &DDict<'b>) -> SafeResult where
    'b: 'a, 
[src]

👎 Deprecated

Wraps the ZSTD_initDStream_usingDDict() function.

pub fn reset(&mut self) -> SafeResult[src]

Wraps the ZSTD_resetDStream() function.

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

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

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

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

pub fn decompress_stream(
    &mut self,
    output: &mut OutBuffer<'_>,
    input: &mut InBuffer<'_>
) -> SafeResult
[src]

Wraps the ZSTD_decompressStream() function.

pub fn in_size() -> usize[src]

Wraps the ZSTD_DStreamInSize() function.

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

pub fn out_size() -> usize[src]

Wraps the ZSTD_DStreamOutSize() function.

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

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

Wraps the ZSTD_sizeof_DCtx() function.

pub fn decompress_block(&mut self, dst: &mut [u8], src: &[u8]) -> usize[src]

Wraps the ZSTD_decompressBlock() function.

pub fn insert_block(&mut self, block: &[u8]) -> usize[src]

Wraps the ZSTD_insertBlock() function.

Trait Implementations

impl<'_> Default for DCtx<'_>[src]

impl<'_> Drop for DCtx<'_>[src]

impl<'_> Send for DCtx<'_>[src]

Auto Trait Implementations

impl<'a> !Sync for DCtx<'a>[src]

impl<'a> Unpin for DCtx<'a>[src]

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.