Expand description
Compression codecs for NodeDB timeseries columnar storage.
Provides per-column codec selection with cascading compression: type-aware encoding (ALP, FastLanes, FSST, Pcodec) followed by a terminal byte compressor (lz4_flex for hot/warm, rANS for cold/S3).
Cascading chains (hot/warm — lz4 terminal):
AlpFastLanesLz4: f64 metrics → ALP → FastLanes → lz4DeltaFastLanesLz4: i64 timestamps/counters → Delta → FastLanes → lz4FastLanesLz4: i64 raw integers → FastLanes → lz4FsstLz4: strings/logs → FSST → lz4PcodecLz4: complex numerics → Pcodec → lz4AlpRdLz4: true doubles → ALP-RD → lz4
Cold/S3 tier chains (rANS terminal):
AlpFastLanesRans,DeltaFastLanesRans,FsstRans
Shared by Origin and Lite. Compiles to WASM.
Re-exports§
pub use crdt_compress::CrdtOp;pub use delta::DeltaDecoder;pub use delta::DeltaEncoder;pub use detect::detect_codec;pub use double_delta::DoubleDeltaDecoder;pub use double_delta::DoubleDeltaEncoder;pub use error::CodecError;pub use gorilla::GorillaDecoder;pub use gorilla::GorillaEncoder;pub use lz4::Lz4Decoder;pub use lz4::Lz4Encoder;pub use pipeline::decode_bytes_pipeline;pub use pipeline::decode_f64_pipeline;pub use pipeline::decode_i64_pipeline;pub use pipeline::encode_bytes_pipeline;pub use pipeline::encode_f64_pipeline;pub use pipeline::encode_i64_pipeline;pub use raw::RawDecoder;pub use raw::RawEncoder;pub use zstd_codec::ZstdDecoder;pub use zstd_codec::ZstdEncoder;
Modules§
- alp
- ALP (Adaptive Lossless floating-Point) codec for f64 columns.
- alp_rd
- ALP-RD (Real Doubles) codec for true arbitrary f64 values.
- crdt_
compress - CRDT state compression for Loro deltas.
- delta
- Delta codec for monotonic counter columns.
- detect
- Codec auto-detection from column type and data distribution.
- double_
delta - DoubleDelta codec for timestamp columns.
- error
- Error types for codec operations.
- fastlanes
- FastLanes-inspired FOR + bit-packing codec for integer columns.
- fsst
- FSST (Fast Static Symbol Table) codec for string/log columns.
- gorilla
- Gorilla XOR encoding for floating-point timeseries metrics.
- lz4
- LZ4 block compression codec for string/log columns.
- pcodec
- Pcodec wrapper for complex numerical sequences.
- pipeline
- Cascading codec pipeline: chains type-aware encoding → terminal compressor.
- rans
- Interleaved rANS (Asymmetric Numeral Systems) entropy coder.
- raw
- Raw (identity) codec — no compression.
- spherical
- Spherical coordinate transform for lossless vector embedding compression.
- zstd_
codec - Zstd compression codec for cold/archived partitions.
Structs§
- Column
Statistics - Per-column statistics computed at flush time.
Enums§
- Column
Codec - Codec identifier for per-column compression selection.
- Column
Type Hint - Column data type hint for codec auto-detection.
Constants§
- CODEC_
SAMPLE_ SIZE - Number of values to sample for codec auto-detection and exponent selection. Used by ALP, ALP-RD, and the codec detector.