Skip to main content

vortex_btrblocks/schemes/integer/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4//! Integer compression schemes.
5
6mod bitpacking;
7#[cfg(feature = "unstable_encodings")]
8mod delta;
9mod for_;
10mod rle;
11mod runend;
12mod sequence;
13mod sparse;
14mod zigzag;
15
16#[cfg(feature = "pco")]
17mod pco;
18
19pub use bitpacking::BitPackingScheme;
20#[cfg(feature = "unstable_encodings")]
21pub use delta::DeltaScheme;
22pub use for_::FoRScheme;
23#[cfg(feature = "pco")]
24pub use pco::PcoScheme;
25pub use rle::IntRLEScheme;
26pub(crate) use rle::rle_compress;
27#[cfg(feature = "unstable_encodings")]
28pub(crate) use rle::try_compress_delta;
29pub use runend::RunEndScheme;
30pub use sequence::SequenceScheme;
31pub use sparse::SparseScheme;
32// Re-export builtin schemes from vortex-compressor.
33pub use vortex_compressor::builtins::IntDictScheme;
34pub use vortex_compressor::stats::IntegerStats;
35pub use zigzag::ZigZagScheme;
36
37/// Threshold for the average run length in an array before we consider run-length encoding.
38pub(crate) const RUN_LENGTH_THRESHOLD: u32 = 4;
39
40#[cfg(test)]
41mod scheme_selection_tests;
42#[cfg(test)]
43mod tests;