Struct zstd_safe::CCtx[][src]

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<C: WriteBuf + ?Sized>(
    &mut self,
    dst: &mut C,
    src: &[u8],
    compression_level: CompressionLevel
) -> SafeResult
[src]

Wraps the ZSTD_compressCCtx() function

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

Wraps the ZSTD_compress2() function.

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

Wraps the ZSTD_compress_usingDict() function.

pub fn compress_using_cdict<C: WriteBuf + ?Sized>(
    &mut self,
    dst: &mut C,
    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<C: WriteBuf + ?Sized>(
    &mut self,
    output: &mut OutBuffer<'_, C>,
    input: &mut InBuffer<'_>
) -> SafeResult
[src]

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

Wraps the ZSTD_compressStream2() function.

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

Wraps the ZSTD_flushStream() function.

pub fn end_stream<C: WriteBuf + ?Sized>(
    &mut self,
    output: &mut OutBuffer<'_, C>
) -> 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<C: WriteBuf + ?Sized>(
    &mut self,
    dst: &mut C,
    src: &[u8]
) -> SafeResult
[src]

Wraps the ZSTD_compressBlock() function.

pub fn in_size() -> usize[src]

pub fn out_size() -> usize[src]

Trait Implementations

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

fn default() -> Self[src]

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

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

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

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

Auto Trait Implementations

impl<'a> !Sync for CCtx<'a>

impl<'a> Unpin for CCtx<'a>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.