lance_encoding::encoder

Trait MiniBlockCompressor

Source
pub trait MiniBlockCompressor:
    Debug
    + Send
    + Sync {
    // Required method
    fn compress(
        &self,
        page: DataBlock,
    ) -> Result<(MiniBlockCompressed, ArrayEncoding)>;
}
Expand description

Trait for compression algorithms that are suitable for use in the miniblock structural encoding

These compression algorithms should be capable of encoding the data into small chunks where each chunk (except the last) has 2^N values (N can vary between chunks)

Required Methods§

Source

fn compress( &self, page: DataBlock, ) -> Result<(MiniBlockCompressed, ArrayEncoding)>

Compress a page of data into multiple chunks

See MiniBlockCompressed for details on how chunks should be sized.

This method also returns a description of the encoding applied that will be used at decode time to read the data.

Implementors§