Trait libflate::lz77::Lz77Encode[][src]

pub trait Lz77Encode {
    pub fn encode<S>(&mut self, buf: &[u8], sink: S)
    where
        S: Sink
;
pub fn flush<S>(&mut self, sink: S)
    where
        S: Sink
; pub fn compression_level(&self) -> CompressionLevel { ... }
pub fn window_size(&self) -> u16 { ... } }

The Lz77Encode trait defines the interface of LZ77 encoding algorithm.

Required methods

pub fn encode<S>(&mut self, buf: &[u8], sink: S) where
    S: Sink
[src]

Encodes a buffer and writes result LZ77 codes to sink.

pub fn flush<S>(&mut self, sink: S) where
    S: Sink
[src]

Flushes the encoder, ensuring that all intermediately buffered codes are consumed by sink.

Loading content...

Provided methods

pub fn compression_level(&self) -> CompressionLevel[src]

Returns the compression level of the encoder.

If the implementation is omitted, CompressionLevel::Balance will be returned.

pub fn window_size(&self) -> u16[src]

Returns the window size of the encoder.

If the implementation is omitted, MAX_WINDOW_SIZE will be returned.

Loading content...

Implementors

impl Lz77Encode for DefaultLz77Encoder[src]

impl Lz77Encode for NoCompressionLz77Encoder[src]

Loading content...