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
sourcepub fn window_log(value: u32) -> Self
pub fn window_log(value: u32) -> Self
Window size in bytes (as a power of two)
sourcepub fn hash_log(value: u32) -> Self
pub fn hash_log(value: u32) -> Self
Size of the initial probe table in 4-byte entries (as a power of two)
sourcepub fn chain_log(value: u32) -> Self
pub fn chain_log(value: u32) -> Self
Size of the multi-probe table in 4-byte entries (as a power of two)
sourcepub fn search_log(value: u32) -> Self
pub fn search_log(value: u32) -> Self
Number of search attempts (as a power of two)
sourcepub fn target_length(value: u32) -> Self
pub fn target_length(value: u32) -> Self
Strategy-dependent length modifier
sourcepub fn enable_long_distance_matching(value: bool) -> Self
pub fn enable_long_distance_matching(value: bool) -> Self
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) -> Self
pub fn ldm_hash_log(value: u32) -> Self
Size of the long-distance matching table (as a power of two)
sourcepub fn ldm_min_match(value: u32) -> Self
pub fn ldm_min_match(value: u32) -> Self
Minimum size of long-distance matches searched for
sourcepub fn ldm_bucket_size_log(value: u32) -> Self
pub fn ldm_bucket_size_log(value: u32) -> Self
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) -> Self
pub fn ldm_hash_rate_log(value: u32) -> Self
Frequency of using the LDM hash table (as a power of two)
sourcepub fn content_size_flag(value: bool) -> Self
pub fn content_size_flag(value: bool) -> Self
Emit the size of the content (default: true).
sourcepub fn checksum_flag(value: bool) -> Self
pub fn checksum_flag(value: bool) -> Self
Emit a checksum (default: false).
sourcepub fn dict_id_flag(value: bool) -> Self
pub fn dict_id_flag(value: bool) -> Self
Emit a dictionary ID when using a custom dictionary (default: true).
sourcepub fn nb_workers(value: u32) -> Self
Available on crate feature zstdmt
only.
pub fn nb_workers(value: u32) -> Self
zstdmt
only.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.
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 moresource§impl Debug for CParameter
impl Debug for CParameter
source§impl PartialEq for CParameter
impl PartialEq for CParameter
impl Copy for CParameter
impl Eq for CParameter
impl StructuralPartialEq for CParameter
Auto Trait Implementations§
impl Freeze for CParameter
impl RefUnwindSafe for CParameter
impl Send for CParameter
impl Sync for CParameter
impl Unpin for CParameter
impl UnwindSafe for CParameter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)