Expand description
Fast-field compression codecs with auto-selection.
Four codecs are available, and the writer picks the smallest at build time:
| Codec | ID | Description |
|---|---|---|
| Constant | 0 | No data bytes — all values identical |
| Bitpacked | 1 | min-subtract + global bitpack |
| Linear | 2 | Regression line, bitpack residuals |
| BlockwiseLinear | 3 | Per-512-block linear, bitpack residuals per block |
Structs§
- Bitpacked
Estimator - Min-subtract + global bitpack. This is the existing codec, now behind a tag.
- Blockwise
Linear Estimator - Per-512-element-block linear interpolation with per-block bitpacked residuals.
- Constant
Estimator - All values are identical → zero data bytes. Value stored in the codec header.
- Linear
Estimator - Fits y = slope * x + intercept across all values, stores residuals bitpacked.
Enums§
- Codec
Type - Codec identifier stored in the column data region (first byte).
Constants§
- BLOCKWISE_
LINEAR_ BLOCK_ SIZE - Block size for BlockwiseLinear codec (matching Tantivy).
Traits§
- Codec
Estimator - Estimates serialized size for a given codec.
Functions§
- auto_
read - Read a single value from auto-codec encoded data.
- auto_
read_ batch - Batch-read
out.len()consecutive values starting atstart_indexfrom auto-codec data. - bitpacked_
read - Read a single value from a bitpacked-codec column.
- bitpacked_
read_ batch - Batch-read
countconsecutive values starting atstart_indexfrom bitpacked data. - blockwise_
linear_ read - Read a single value from a blockwise-linear-codec column.
- linear_
read - Read a single value from a linear-codec column.
- serialize_
auto - Serialize values using the codec that produces the smallest output.