#[non_exhaustive]pub enum CParameter {
WindowLog,
HashLog,
ChainLog,
SearchLog,
MinMatch,
TargetLength,
Strategy,
EnableLongDistanceMatching,
LdmHashLog,
LdmMinMatch,
LdmBucketSizeLog,
LdmHashRateLog,
}Expand description
One tunable compression parameter — the analogue of a C zstd
ZSTD_cParameter. Used to query bounds via CParameter::bounds.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WindowLog
Maximum back-reference distance, log2. C ZSTD_c_windowLog.
HashLog
Match-finder hash table size, log2. C ZSTD_c_hashLog.
ChainLog
Match-finder chain table size, log2. C ZSTD_c_chainLog.
SearchLog
Number of search attempts, log2. C ZSTD_c_searchLog.
MinMatch
Minimum match length in bytes. C ZSTD_c_minMatch.
TargetLength
“Good enough” match length that ends the search. C ZSTD_c_targetLength.
Strategy
Match-finder Strategy (1..=9). C ZSTD_c_strategy.
EnableLongDistanceMatching
LDM enable flag (0/1). C ZSTD_c_enableLongDistanceMatching.
LdmHashLog
LDM hash table size, log2. C ZSTD_c_ldmHashLog.
LdmMinMatch
LDM minimum match length in bytes. C ZSTD_c_ldmMinMatch.
LdmBucketSizeLog
LDM bucket size, log2. C ZSTD_c_ldmBucketSizeLog.
LdmHashRateLog
LDM hash-insertion rate, log2. C ZSTD_c_ldmHashRateLog.
Implementations§
Source§impl CParameter
impl CParameter
Sourcepub const fn bounds(self) -> Bounds
pub const fn bounds(self) -> Bounds
Inclusive value bounds for this parameter, mirroring
ZSTD_cParam_getBounds. Window/hash/chain logs cap at 30 (the
encoder’s match-finder ceiling) rather than the 31 C allows on
64-bit, because the back-reference history is indexed with u32
positions over a 2 * window eviction band.
Trait Implementations§
Source§impl Clone for CParameter
impl Clone for CParameter
Source§fn clone(&self) -> CParameter
fn clone(&self) -> CParameter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CParameter
Source§impl Debug for CParameter
impl Debug for CParameter
impl Eq for CParameter
Source§impl PartialEq for CParameter
impl PartialEq for CParameter
Source§fn eq(&self, other: &CParameter) -> bool
fn eq(&self, other: &CParameter) -> bool
self and other values to be equal, and is used by ==.