pub struct CParameter(/* private fields */);
zstd
only.Expand description
A compression parameter for zstd. This is a stable wrapper around zstd’s own CParameter
type, to abstract over different versions of the zstd library.
See the zstd documentation for more information on these parameters.
Implementations§
Source§impl CParameter
impl CParameter
pub fn quality(level: Level) -> i32
Sourcepub fn window_log(value: u32) -> CParameter
pub fn window_log(value: u32) -> CParameter
Window size in bytes (as a power of two)
Sourcepub fn hash_log(value: u32) -> CParameter
pub fn hash_log(value: u32) -> CParameter
Size of the initial probe table in 4-byte entries (as a power of two)
Sourcepub fn chain_log(value: u32) -> CParameter
pub fn chain_log(value: u32) -> CParameter
Size of the multi-probe table in 4-byte entries (as a power of two)
Sourcepub fn search_log(value: u32) -> CParameter
pub fn search_log(value: u32) -> CParameter
Number of search attempts (as a power of two)
Sourcepub fn min_match(value: u32) -> CParameter
pub fn min_match(value: u32) -> CParameter
Minimum size of matches searched for
Sourcepub fn target_length(value: u32) -> CParameter
pub fn target_length(value: u32) -> CParameter
Strategy-dependent length modifier
Sourcepub fn enable_long_distance_matching(value: bool) -> CParameter
pub fn enable_long_distance_matching(value: bool) -> CParameter
Enable long-distance matching mode to look for and emit long-distance references.
This increases the default window size.
Sourcepub fn ldm_hash_log(value: u32) -> CParameter
pub fn ldm_hash_log(value: u32) -> CParameter
Size of the long-distance matching table (as a power of two)
Sourcepub fn ldm_min_match(value: u32) -> CParameter
pub fn ldm_min_match(value: u32) -> CParameter
Minimum size of long-distance matches searched for
Sourcepub fn ldm_bucket_size_log(value: u32) -> CParameter
pub fn ldm_bucket_size_log(value: u32) -> CParameter
Size of each bucket in the LDM hash table for collision resolution (as a power of two)
Sourcepub fn ldm_hash_rate_log(value: u32) -> CParameter
pub fn ldm_hash_rate_log(value: u32) -> CParameter
Frequency of using the LDM hash table (as a power of two)
Sourcepub fn content_size_flag(value: bool) -> CParameter
pub fn content_size_flag(value: bool) -> CParameter
Emit the size of the content (default: true).
Sourcepub fn checksum_flag(value: bool) -> CParameter
pub fn checksum_flag(value: bool) -> CParameter
Emit a checksum (default: false).
Sourcepub fn dict_id_flag(value: bool) -> CParameter
pub fn dict_id_flag(value: bool) -> CParameter
Emit a dictionary ID when using a custom dictionary (default: true).
Sourcepub fn nb_workers(value: u32) -> CParameter
pub fn nb_workers(value: u32) -> CParameter
Number of threads to spawn.
If set to 0, compression functions will block; if set to 1 or more, compression will
run in background threads and flush
pushes bytes through the compressor.
§Panics
This parameter requires feature zstdmt
to be enabled, otherwise it will cause a panic
when used in ZstdEncoder::with_quality_and_params()
calls.
Sourcepub fn job_size(value: u32) -> CParameter
pub fn job_size(value: u32) -> CParameter
Number of bytes given to each worker.
If set to 0, zstd selects a job size based on compression parameters.
Trait Implementations§
Source§impl Clone for CParameter
impl Clone for CParameter
Source§fn clone(&self) -> CParameter
fn clone(&self) -> CParameter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more