Struct Compression
pub struct Compression(/* private field */);
When compressing data, the compression level can be specified by a value in this struct.
Implementations
impl Compression
const fn new(level: u32) -> CompressionCreates a new description of the compression level with an explicitly specified integer.
The integer here is typically on a scale of 0-9 where 0 means "no compression" and 9 means "take as long as you'd like".
const fn none() -> CompressionNo compression is to be performed, this may actually inflate data slightly when encoding.
const fn fast() -> CompressionOptimize for the best speed of encoding.
const fn best() -> CompressionOptimize for the size of data being encoded.
fn level(&self) -> u32Returns an integer representing the compression level, typically on a scale of 0-9. See
newfor details about compression levels.
Trait Implementations
impl Clone for Compression
fn clone(&self) -> Self
impl Copy for Compression
impl Debug for Compression
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Compression
fn default() -> Compression
impl Eq for Compression
impl PartialEq for Compression
fn eq(&self, other: &Self) -> bool