pub enum CompressionMode {
Default(i32),
Dictionary(i32, Vec<u8>),
Training(usize),
}Expand description
Selects the zstd compression strategy applied to a direction of traffic.
Variants§
Default(i32)
Compression mode using default zstd dictionary. 1st i32 parameter here is the compression level from -7 (fastest) to 22 (smallest).
Dictionary(i32, Vec<u8>)
Compression mode using custom dictionary.
1st i32 parameter here is the compression level from -7 (fastest) to 22
(smallest). 2nd Vec<u8> parameter here is the dictionary itself.
Training(usize)
Dictionary training mode. 1st usize parameter here describes the desired number of samples (packets) to train on. Obviously, the more samples trained on, the better theoretical compression.
Trait Implementations§
Source§impl Clone for CompressionMode
impl Clone for CompressionMode
Source§fn clone(&self) -> CompressionMode
fn clone(&self) -> CompressionMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl PartialEq for CompressionMode
impl PartialEq for CompressionMode
Source§fn eq(&self, other: &CompressionMode) -> bool
fn eq(&self, other: &CompressionMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CompressionMode
impl StructuralPartialEq for CompressionMode
Auto Trait Implementations§
impl Freeze for CompressionMode
impl RefUnwindSafe for CompressionMode
impl Send for CompressionMode
impl Sync for CompressionMode
impl Unpin for CompressionMode
impl UnsafeUnpin for CompressionMode
impl UnwindSafe for CompressionMode
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