pub struct CodecSelector;Expand description
Analyzes your data and picks the best compression codec.
Don’t want to think about compression? Call select_for_integers()
or select_for_strings() and we’ll examine your data
to pick the codec with the best compression ratio.
Implementations§
Source§impl CodecSelector
impl CodecSelector
Sourcepub fn select_for_integers(values: &[u64]) -> CompressionCodec
pub fn select_for_integers(values: &[u64]) -> CompressionCodec
Selects the best codec for a slice of u64 values.
Considers multiple codecs and picks the one with the best estimated compression ratio:
- RunLength: Best for highly repetitive data (avg run length > 2)
- DeltaBitPacked: Best for sorted/sequential integers
- BitPacked: Best for small integers with limited range
Sourcepub fn select_for_strings(values: &[&str]) -> CompressionCodec
pub fn select_for_strings(values: &[&str]) -> CompressionCodec
Selects the best codec for a slice of strings.
Sourcepub fn select_for_booleans(_values: &[bool]) -> CompressionCodec
pub fn select_for_booleans(_values: &[bool]) -> CompressionCodec
Selects the best codec for boolean values.
Auto Trait Implementations§
impl Freeze for CodecSelector
impl RefUnwindSafe for CodecSelector
impl Send for CodecSelector
impl Sync for CodecSelector
impl Unpin for CodecSelector
impl UnwindSafe for CodecSelector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more