Skip to main content

Compressible

Trait Compressible 

Source
pub trait Compressible {
    // Required method
    fn compress(&self, format: CompressionFormat) -> Result<Vec<u8>>;
}
Expand description

Internal trait to implement compression over a data type.

See also Decompressible for the reverse operation.

Required Methods§

Source

fn compress(&self, format: CompressionFormat) -> Result<Vec<u8>>

This function compress the data of a file, returning the compressed data.

§Arguments
§Returns

A Vec<u8> containing the compressed data, or an error if compression failed.

Implementations on Foreign Types§

Source§

impl Compressible for [u8]

Implementors§