Trait CompressionLevel

Source
pub trait CompressionLevel {
    // Required methods
    fn highest_ratio(self) -> Self;
    fn balanced(self) -> Self;
    fn fastest(self) -> Self;
    fn level(self, level: u32) -> Self;
}
Expand description

Interface for applicable compression algorithms and implementations that allow users to specify a compression level.

Required Methods§

Source

fn highest_ratio(self) -> Self

Sets the compression level to the highest possible level for the algorithm/implementation.

Source

fn balanced(self) -> Self

Sets the compression level to a balance between speed and size.

Typically set to the default compression level for the specific algorithm/implementation.

Source

fn fastest(self) -> Self

Sets the compression level to the fastest possible speed supported by the algorithm/implementation.

Source

fn level(self, level: u32) -> Self

Allows a user to set the compression level to a specific level.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§