pub struct Config {
pub target_output_size: u64,
pub approx_compr_ratio: f64,
pub kind: CompressorType,
pub compression_algo: CompressionAlgo,
}Expand description
Configuration for the compressor itself.
Fields§
§target_output_size: u64TargetOutputSize is the target size that the compressed data should reach. The shadow compressor guarantees that the compressed data stays below this bound. The ratio compressor might go over.
approx_compr_ratio: f64ApproxComprRatio to assume (only ratio compressor). Should be slightly smaller than average from experiments to avoid the chances of creating a small additional leftover frame.
kind: CompressorTypeKind of compressor to use. Must be one of KindKeys. If unset, NewCompressor will default to RatioKind.
compression_algo: CompressionAlgoType of compression algorithm to use. Must be one of [zlib, brotli-(9|10|11)]
Trait Implementations§
Source§impl From<Config> for RatioCompressor
Available on crate feature std only.
impl From<Config> for RatioCompressor
Available on crate feature
std only.Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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