[][src]Struct zstd_safe::CCtx

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

Implementations

impl CCtx<'static>[src]

pub fn create() -> Self[src]

Wrap ZSTD_createCCtx

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

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

Wraps the ZSTD_compressCCtx() function

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

Wraps the ZSTD_compress2() function.

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

Wraps the ZSTD_compress_usingDict() function.

pub fn compress_using_cdict(
    &mut self,
    dst: &mut [u8],
    src: &[u8],
    cdict: &CDict<'_>
) -> SafeResult
[src]

Wraps the ZSTD_compress_usingCDict() function.

pub fn init(&mut self, compression_level: CompressionLevel) -> usize[src]

pub fn init_src_size(
    &mut self,
    compression_level: CompressionLevel,
    pledged_src_size: u64
) -> usize
[src]

👎 Deprecated

Wraps the ZSTD_initCStream_srcSize() function.

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

👎 Deprecated

Wraps the ZSTD_initCStream_usingDict() function.

pub fn init_using_cdict<'b>(&mut self, cdict: &CDict<'b>) -> SafeResult where
    'b: 'a, 
[src]

👎 Deprecated

Wraps the ZSTD_initCStream_usingCDict() function.

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

pub fn ref_cdict<'b>(&mut self, cdict: &CDict<'b>) -> SafeResult where
    'b: 'a, 
[src]

Wraps the ZSTD_CCtx_refCDict() function.

Dictionary must outlive the context.

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

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

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

Wraps the ZSTD_compressStream2() function.

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

Wraps the ZSTD_flushStream() function.

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

Wraps the ZSTD_endStream() function.

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

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

pub fn reset_cstream(&mut self, pledged_src_size: u64) -> SafeResult[src]

👎 Deprecated

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

pub fn set_pledged_src_size(&mut self, pledged_src_size: u64) -> SafeResult[src]

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

Wraps the ZSTD_getBlockSize() function.

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

Wraps the ZSTD_compressBlock() function.

Trait Implementations

impl<'a> Default for CCtx<'a>[src]

impl<'a> Drop for CCtx<'a>[src]

impl<'a> Send for CCtx<'a>[src]

Auto Trait Implementations

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

impl<'a> Unpin for CCtx<'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.