Trait libflate::lz77::Lz77Encode
source · pub trait Lz77Encode {
// Required methods
fn encode<S>(&mut self, buf: &[u8], sink: S)
where S: Sink;
fn flush<S>(&mut self, sink: S)
where S: Sink;
// Provided methods
fn compression_level(&self) -> CompressionLevel { ... }
fn window_size(&self) -> u16 { ... }
}
Expand description
The Lz77Encode
trait defines the interface of LZ77 encoding algorithm.
Required Methods§
Provided Methods§
sourcefn compression_level(&self) -> CompressionLevel
fn compression_level(&self) -> CompressionLevel
Returns the compression level of the encoder.
If the implementation is omitted, CompressionLevel::Balance
will be returned.
sourcefn window_size(&self) -> u16
fn window_size(&self) -> u16
Returns the window size of the encoder.
If the implementation is omitted, MAX_WINDOW_SIZE
will be returned.
Object Safety§
This trait is not object safe.