pub struct CompressionConfig {
pub level: i32,
pub window_log: u32,
pub checksum: bool,
pub content_size: bool,
pub dict_id: bool,
pub format: FrameFormat,
}Expand description
Every compression setting, stated explicitly by the caller. Use one of the named presets or build your own; there is no implicit default.
Fields§
§level: i32zstd level: MIN_LEVEL..=MAX_LEVEL, excluding 0. Levels mean what they mean in zstd.
window_log: u32Upper bound on the window (log2 bytes, 10..=30). The window also shrinks to fit the input.
checksum: boolAppend the XXH64-based content checksum.
content_size: boolRecord the content size in the frame header.
dict_id: boolRecord the dictionary ID in the frame header (when the dictionary has one).
format: FrameFormatStandard frames, or magicless ones (4 bytes smaller; the decoder must be told).
Implementations§
Source§impl CompressionConfig
impl CompressionConfig
Sourcepub const FAST: CompressionConfig
pub const FAST: CompressionConfig
zstd level 1: fastest.
Sourcepub const DEFAULT: CompressionConfig
pub const DEFAULT: CompressionConfig
zstd level 3: the reference default.
Sourcepub const HIGH: CompressionConfig
pub const HIGH: CompressionConfig
zstd level 19: optimal parsing.
Sourcepub const MESSAGE: CompressionConfig
pub const MESSAGE: CompressionConfig
Small-message profile: level 3, no dictionary ID (the ID is known out of band).
Trait Implementations§
Source§impl Clone for CompressionConfig
impl Clone for CompressionConfig
impl Copy for CompressionConfig
Source§impl Debug for CompressionConfig
impl Debug for CompressionConfig
impl Eq for CompressionConfig
Source§impl PartialEq for CompressionConfig
impl PartialEq for CompressionConfig
impl StructuralPartialEq for CompressionConfig
Auto Trait Implementations§
impl Freeze for CompressionConfig
impl RefUnwindSafe for CompressionConfig
impl Send for CompressionConfig
impl Sync for CompressionConfig
impl Unpin for CompressionConfig
impl UnsafeUnpin for CompressionConfig
impl UnwindSafe for CompressionConfig
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
Mutably borrows from an owned value. Read more