pub struct DCtx<'a>(_, _);
Expand description
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
sourceimpl<'a> DCtx<'a>
impl<'a> DCtx<'a>
sourcepub fn decompress<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8]
) -> SafeResult
pub fn decompress<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8]
) -> SafeResult
Wraps the ZSTD_decompressDCtx()
function.
sourcepub fn decompress_using_dict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
dict: &[u8]
) -> SafeResult
pub fn decompress_using_dict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
dict: &[u8]
) -> SafeResult
Wraps ZSTD_decompress_usingDict
sourcepub fn decompress_using_ddict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
ddict: &DDict<'_>
) -> SafeResult
pub fn decompress_using_ddict<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8],
ddict: &DDict<'_>
) -> SafeResult
Wraps the ZSTD_decompress_usingDDict()
function.
sourcepub fn init(&mut self) -> usize
pub fn init(&mut self) -> usize
Wraps the ZSTD_initCStream()
function.
Initializes an existing DStream
for decompression.
sourcepub fn init_using_dict(&mut self, dict: &[u8]) -> SafeResult
👎 DeprecatedAvailable on crate feature experimental
only.
pub fn init_using_dict(&mut self, dict: &[u8]) -> SafeResult
experimental
only.Wraps the ZSTD_initDStream_usingDict()
function.
sourcepub fn init_using_ddict<'b>(&mut self, ddict: &DDict<'b>) -> SafeResult where
'b: 'a,
👎 DeprecatedAvailable on crate feature experimental
only.
pub fn init_using_ddict<'b>(&mut self, ddict: &DDict<'b>) -> SafeResult where
'b: 'a,
experimental
only.Wraps the ZSTD_initDStream_usingDDict()
function.
sourcepub fn reset(&mut self) -> SafeResult
pub fn reset(&mut self) -> SafeResult
Wraps the ZSTD_resetDStream()
function.
pub fn load_dictionary(&mut self, dict: &[u8]) -> SafeResult
pub fn ref_ddict<'b>(&mut self, ddict: &DDict<'b>) -> SafeResult where
'b: 'a,
pub fn ref_prefix<'b>(&mut self, prefix: &'b [u8]) -> SafeResult where
'b: 'a,
pub fn set_parameter(&mut self, param: DParameter) -> SafeResult
sourcepub fn decompress_stream<C: WriteBuf + ?Sized>(
&mut self,
output: &mut OutBuffer<'_, C>,
input: &mut InBuffer<'_>
) -> SafeResult
pub fn decompress_stream<C: WriteBuf + ?Sized>(
&mut self,
output: &mut OutBuffer<'_, C>,
input: &mut InBuffer<'_>
) -> SafeResult
Wraps the ZSTD_decompressStream()
function.
sourcepub fn in_size() -> usize
pub fn in_size() -> usize
Wraps the ZSTD_DStreamInSize()
function.
Returns a hint for the recommended size of the input buffer for decompression.
sourcepub fn out_size() -> usize
pub fn out_size() -> usize
Wraps the ZSTD_DStreamOutSize()
function.
Returns a hint for the recommended size of the output buffer for decompression.
sourcepub fn decompress_block<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8]
) -> SafeResult
Available on crate feature experimental
only.
pub fn decompress_block<C: WriteBuf + ?Sized>(
&mut self,
dst: &mut C,
src: &[u8]
) -> SafeResult
experimental
only.Wraps the ZSTD_decompressBlock()
function.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for DCtx<'a>
impl<'a> !Sync for DCtx<'a>
impl<'a> Unpin for DCtx<'a>
impl<'a> UnwindSafe for DCtx<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more