Struct libdeflater::Compressor[][src]

pub struct Compressor { /* fields omitted */ }
Expand description

A libdeflate compressor that can compress arbitrary data into DEFLATE, zlib, or gzip formats.

Implementations

Returns a newly constructed Compressor that compresses data with the supplied CompressionLvl

Returns the maximum number of bytes required to encode n_bytes as deflate data. This is a hard upper-bound that assumes the worst possible compression ratio (i.e. assumes the data cannot be compressed), format overhead, etc.

Compresses in_raw_data as deflate data, writing the data into out_deflate_data. Returns the number of bytes written into out_deflate_data.

Returns the maximum number of bytes required to encode n_bytes as zlib data. This is a hard upper-bound that assumes the worst possible compression ratio (i.e. assumes the data cannot be compressed), format overhead, etc.

Compresses in_raw_data as zlib data, writing the data into out_zlib_data. Returns the number of bytes written into out_zlib_data.

Returns the maximum number of bytes required to encode n_bytes as gzip data. This is a hard upper-bound that assumes the worst possible compression ratio (i.e. assumes the data cannot be compressed), format overhead, etc.

Compresses in_raw_data as gzip data, writing the data into out_gzip_data. Returns the number of bytes written into out_gzip_data.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.