pub type CStream<'a> = CCtx<'a>;
Expand description
Compression stream.
Same as CCtx
.
Aliased Type§
struct CStream<'a>(/* private fields */);
Implementations
Source§impl<'a> CCtx<'a>
impl<'a> CCtx<'a>
Sourcepub fn compress<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
compression_level: CompressionLevel,
) -> SafeResult
pub fn compress<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], compression_level: CompressionLevel, ) -> SafeResult
Wraps the ZSTD_compressCCtx()
function
Sourcepub fn compress2<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
) -> SafeResult
pub fn compress2<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], ) -> SafeResult
Wraps the ZSTD_compress2()
function.
Sourcepub fn compress_using_dict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
dict: &[u8],
compression_level: CompressionLevel,
) -> SafeResult
pub fn compress_using_dict<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], dict: &[u8], compression_level: CompressionLevel, ) -> SafeResult
Wraps the ZSTD_compress_usingDict()
function.
Sourcepub fn compress_using_cdict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
cdict: &CDict<'_>,
) -> SafeResult
pub fn compress_using_cdict<C: WriteBuf + ?Sized>( &mut self, dst: &mut C, src: &[u8], cdict: &CDict<'_>, ) -> SafeResult
Wraps the ZSTD_compress_usingCDict()
function.
pub fn init(&mut self, compression_level: CompressionLevel) -> usize
pub fn load_dictionary(&mut self, dict: &[u8]) -> SafeResult
Sourcepub fn ref_cdict<'b>(&mut self, cdict: &CDict<'b>) -> SafeResultwhere
'b: 'a,
pub fn ref_cdict<'b>(&mut self, cdict: &CDict<'b>) -> SafeResultwhere
'b: 'a,
Wraps the ZSTD_CCtx_refCDict()
function.
Dictionary must outlive the context.
pub fn ref_prefix<'b>(&mut self, prefix: &'b [u8]) -> SafeResultwhere
'b: 'a,
pub fn compress_stream<C: WriteBuf + ?Sized>( &mut self, output: &mut OutBuffer<'_, C>, input: &mut InBuffer<'_>, ) -> SafeResult
Sourcepub fn compress_stream2<C: WriteBuf + ?Sized>(
&mut self,
output: &mut OutBuffer<'_, C>,
input: &mut InBuffer<'_>,
end_op: ZSTD_EndDirective,
) -> SafeResult
pub fn compress_stream2<C: WriteBuf + ?Sized>( &mut self, output: &mut OutBuffer<'_, C>, input: &mut InBuffer<'_>, end_op: ZSTD_EndDirective, ) -> SafeResult
Wraps the ZSTD_compressStream2()
function.
Sourcepub fn flush_stream<C: WriteBuf + ?Sized>(
&mut self,
output: &mut OutBuffer<'_, C>,
) -> SafeResult
pub fn flush_stream<C: WriteBuf + ?Sized>( &mut self, output: &mut OutBuffer<'_, C>, ) -> SafeResult
Wraps the ZSTD_flushStream()
function.
Sourcepub fn end_stream<C: WriteBuf + ?Sized>(
&mut self,
output: &mut OutBuffer<'_, C>,
) -> SafeResult
pub fn end_stream<C: WriteBuf + ?Sized>( &mut self, output: &mut OutBuffer<'_, C>, ) -> SafeResult
Wraps the ZSTD_endStream()
function.