Expand description
Compression traits and definitions for Lance 2.1
In 2.1 the first step of encoding is structural encoding, where we shred inputs into leaf arrays and take care of the validity / offsets structure. Then we pick a structural encoding (mini-block or full-zip) and then we compress the data.
This module defines the traits for the compression step. Each structural encoding has its own compression strategy.
Miniblock compression is a block based approach for small data. Since we introduce some read amplification and decompress entire blocks we are able to use opaque compression.
Fullzip compression is a per-value approach where we require that values are transparently compressed so that we can locate them later.
Structs§
Traits§
- Block
Compressor - Trait for compression algorithms that compress an entire block of data into one opaque and self-described chunk.
- Block
Decompressor - Compression
Strategy - A trait to pick which compression to use for given data
- Decompression
Strategy - Fixed
PerValue Decompressor - Mini
Block Decompressor - Variable
PerValue Decompressor
Functions§
- field_
metadata_ params - Parse field-level compression metadata without applying format-specific constraints.
- finalize_
miniblock_ compressor - Apply general-purpose compression requested for a fixed-width miniblock.
- reject_
packed_ struct_ per_ value - Reject variable-width packed structs while preserving the fixed-width error.
- try_
bitpacking_ block - Select block bitpacking for applicable fixed-width values.
- try_
bitpacking_ miniblock - Select inline bitpacking for applicable fixed-width miniblocks.
- try_
byte_ stream_ split_ miniblock - Select byte-stream-split compression for an applicable fixed-width miniblock.
- try_
child_ rle_ miniblock - Select variable-width RLE with independently encoded children.
- try_
fixed_ packed_ struct_ miniblock - Encode fixed-width packed structs as miniblocks.
- try_
fixed_ u8_ rle_ block - Select fixed-u8 RLE for block compression.
- try_
fixed_ u8_ rle_ miniblock - Select the original fixed-u8 RLE miniblock grammar.
- try_
general_ block - Select explicitly requested or automatic general-purpose block compression.
- try_
raw_ block - Store fixed- and variable-width block values without block compression.
- try_
raw_ fixed_ size_ list_ miniblock - Store fixed-size-list miniblocks without a value codec.
- try_
raw_ fixed_ width_ miniblock - Store fixed-width miniblock values without a value codec.
- try_
raw_ per_ value - Store fixed-width and fixed-size-list values directly in full-zip pages.
- try_
uncompressed_ fixed_ width_ miniblock - Honor an explicit
compression = nonerequest for fixed-width miniblocks. - try_
variable_ packed_ struct_ per_ value - Encode variable-width packed structs with the exact strategy recursively.
- try_
variable_ rle_ block - Select variable-width RLE for block compression.
- try_
variable_ width_ miniblock - Encode variable-width miniblocks with binary or FSST encoding.
- try_
variable_ width_ per_ value - Encode variable-width values directly, with FSST or per-value compression when applicable.