pub struct ZSTD_dParameter(/* private fields */);Expand description
The advanced API pushes parameters one by one into an existing ZSTD_DCtx decompression
context. Parameters are sticky, and remain valid for all following frames using the same
context.
It’s possible to reset parameters to default values using ZSTD_DCtx_reset.
Implementations§
Source§impl ZSTD_dParameter
impl ZSTD_dParameter
pub const ZSTD_d_experimentalParam1: Self
pub const ZSTD_d_experimentalParam2: Self
pub const ZSTD_d_experimentalParam3: Self
pub const ZSTD_d_experimentalParam4: Self
pub const ZSTD_d_experimentalParam5: Self
pub const ZSTD_d_experimentalParam6: Self
Sourcepub const ZSTD_d_format: Self = Self::ZSTD_d_experimentalParam1
pub const ZSTD_d_format: Self = Self::ZSTD_d_experimentalParam1
Experimental parameter: allowing selection between ZSTD_format_e input compression formats
Sourcepub const ZSTD_d_stableOutBuffer: Self = Self::ZSTD_d_experimentalParam2
pub const ZSTD_d_stableOutBuffer: Self = Self::ZSTD_d_experimentalParam2
Experimental parameter: tells the decompressor that the ZSTD_outBuffer will ALWAYS be
the same between calls, except for the modifications that zstd makes to pos (the caller
must not modify pos). This is checked by the decompressor, and decompression will fail if
it ever changes. Therefore the ZSTD_outBuffer MUST be large enough to fit the entire
decompressed frame. This will be checked when the frame content size is known. The data in
the ZSTD_outBuffer in the range dst..(dst + pos) MUST not be modified during
decompression or you will get data corruption.
When this flag is enabled zstd won’t allocate an output buffer, because it can write
directly to the ZSTD_outBuffer, but it will still allocate an input buffer large enough
to fit any compressed block. This will also avoid the memcpy() from the internal output
buffer to the ZSTD_outBuffer. If you need to avoid the input buffer allocation use the
buffer-less streaming API.
Note: So long as the ZSTD_outBuffer always points to valid memory, using this flag is
ALWAYS memory safe, and will never access out-of-bounds memory. However, decompression WILL
fail if you violate the preconditions.
Warning: The data in the ZSTD_outBuffer in the range dst..(dst + pos) MUST not be
modified during decompression or you will get data corruption. This is because zstd needs
to reference data in the ZSTD_outBuffer to regenerate matches. Normally zstd maintains
its own buffer for this purpose, but passing this flag tells zstd to use the user provided
buffer.
Default is 0 == disabled. Set to 1 to enable.
Sourcepub const ZSTD_d_forceIgnoreChecksum: Self = Self::ZSTD_d_experimentalParam3
pub const ZSTD_d_forceIgnoreChecksum: Self = Self::ZSTD_d_experimentalParam3
Experimental parameter: tells the decompressor to skip checksum validation during decompression, regardless of whether checksumming was specified during compression. This offers some slight performance benefits, and may be useful for debugging.
Default is 0 == disabled. Set to 1 to enable.
Sourcepub const ZSTD_d_refMultipleDDicts: Self = Self::ZSTD_d_experimentalParam4
pub const ZSTD_d_refMultipleDDicts: Self = Self::ZSTD_d_experimentalParam4
Experimental parameter: if enabled and ZSTD_DCtx is allocated on the heap, then
additional memory will be allocated to store references to multiple ZSTD_DDict. That
is, multiple calls of ZSTD_DCtx_refDDict using a given ZSTD_DCtx, rather than
overwriting the previous DDict reference, will instead store all references. At
decompression time, the appropriate dictID is selected from the set of DDicts based on
the dictID in the frame.
Warning: Enabling this parameter and calling ZSTD_DCtx_refDDict will trigger memory
allocation for the hash table. ZSTD_freeDCtx also frees this memory. Memory is
allocated as per ZSTD_DCtx::customMem.
Although this function allocates memory for the table, the user is still responsible for
memory management of the underlying ZSTD_DDict themselves.
Default is 0 == disabled. Set to 1 to enable.
Sourcepub const ZSTD_d_disableHuffmanAssembly: Self = Self::ZSTD_d_experimentalParam5
pub const ZSTD_d_disableHuffmanAssembly: Self = Self::ZSTD_d_experimentalParam5
This parameter can be used to disable Huffman assembly at runtime.
Set to 1 to disable the Huffman assembly implementation. The default value is 0, which allows zstd to use the Huffman assembly implementation if available.
Sourcepub const ZSTD_d_maxBlockSize: Self = Self::ZSTD_d_experimentalParam6
pub const ZSTD_d_maxBlockSize: Self = Self::ZSTD_d_experimentalParam6
Forces the decompressor to reject blocks whose content size is larger than the configured
maxBlockSize. When maxBlockSize is larger than the windowSize, the windowSize is
used instead. This saves memory on the decoder when you know all blocks are small.
Allowed values are between 1KB and ZSTD_BLOCKSIZE_MAX (128KB).
The default is ZSTD_BLOCKSIZE_MAX, and setting to 0 will set to the default.
This option is typically used in conjunction with ZSTD_c_maxBlockSize.
Warning: This causes the decoder to reject otherwise valid frames that have block sizes
larger than the configured maxBlockSize.
Sourcepub const ZSTD_d_windowLogMax: Self
pub const ZSTD_d_windowLogMax: Self
Select a size limit (in power of 2) beyond which the streaming API will refuse to allocate memory buffer in order to protect the host from unreasonable memory requirements.
This parameter is only useful in streaming mode, since no internal buffer is allocated in
single-pass mode. By default, a decompression context accepts window sizes less than or
equal to (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
A value of 0 means “use default maximum windowLog”.
Trait Implementations§
Source§impl Clone for ZSTD_dParameter
impl Clone for ZSTD_dParameter
Source§fn clone(&self) -> ZSTD_dParameter
fn clone(&self) -> ZSTD_dParameter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ZSTD_dParameter
impl Debug for ZSTD_dParameter
Source§impl PartialEq for ZSTD_dParameter
impl PartialEq for ZSTD_dParameter
Source§fn eq(&self, other: &ZSTD_dParameter) -> bool
fn eq(&self, other: &ZSTD_dParameter) -> bool
self and other values to be equal, and is used by ==.