Expand description
Vortex’s BtrBlocks-inspired adaptive compression framework.
This crate provides a sophisticated multi-level compression system that adaptively selects optimal compression schemes based on data characteristics. The compressor analyzes arrays to determine the best encoding strategy, supporting cascaded compression with multiple encoding layers for maximum efficiency.
§Key Features
- Adaptive Compression: Automatically selects the best compression scheme based on data patterns
- Type-Specific Compressors: Specialized compression for integers, floats, strings, and temporal data
- Cascaded Encoding: Multiple compression layers can be applied for optimal results
- Statistical Analysis: Uses data sampling and statistics to predict compression ratios
- Recursive Structure Handling: Compresses nested structures like structs and lists
§Example
use vortex_btrblocks::{BtrBlocksCompressor, BtrBlocksCompressorBuilder, IntCode};
use vortex_array::Array;
// Default compressor with all schemes enabled
let compressor = BtrBlocksCompressor::default();
// Configure with builder to exclude specific schemes
let compressor = BtrBlocksCompressorBuilder::default()
.exclude_int([IntCode::Dict])
.build();Structs§
- BtrBlocks
Compressor - The main compressor type implementing BtrBlocks-inspired compression.
- BtrBlocks
Compressor Builder - Builder for creating configured
BtrBlocksCompressorinstances. - Generate
Stats Options - Configures how stats are generated.
- Integer
Stats - Array of integers and relevant stats for compression.
Enums§
- Float
Code - Unique identifier for float compression schemes.
- IntCode
- Unique identifier for integer compression schemes.
- String
Code - Unique identifier for string compression schemes.
Traits§
- Canonical
Compressor - Trait for compressors that can compress canonical arrays.
- Compressor
Stats - Stats for the compressor.
Functions§
- integer_
dictionary_ encode - Compresses an integer array into a dictionary arrays according to attached stats.