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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Compressor
impl !Sync for Compressor
impl Unpin for Compressor
impl UnwindSafe for Compressor