pub struct OutOfLineBitpacking { /* private fields */ }
Expand description
A transparent compressor that bit packs data
In order for the encoding to be transparent we must have a fixed bit width across the entire array. Chunking within the buffer is not supported. This means that we will be slightly less efficient than something like the mini-block approach.
WARNING: DO NOT USE YET.
This was an interesting experiment but it can’t be used as a per-value compressor at the moment. The resulting data IS transparent but it’s not quite so simple. We compress in blocks of 1024 and each block has a fixed size but also has some padding.
In other words, if we try the simple math to access the item at index i
we will be
out of luck because bits_per_value * i
is not the location. What we need is something
like:
let chunk_idx = i / 1024;
let chunk_offset = i % 1024;
bits_per_chunk * chunk_idx + bits_per_value * chunk_offset
However, this logic isn’t expressible with the per-value traits we have today. We can enhance these traits should we need to support it at some point in the future.
Trait Implementations§
Source§impl Debug for OutOfLineBitpacking
impl Debug for OutOfLineBitpacking
Source§impl FixedPerValueDecompressor for OutOfLineBitpacking
impl FixedPerValueDecompressor for OutOfLineBitpacking
Source§fn decompress(
&self,
data: FixedWidthDataBlock,
num_values: u64,
) -> Result<DataBlock>
fn decompress( &self, data: FixedWidthDataBlock, num_values: u64, ) -> Result<DataBlock>
Source§fn bits_per_value(&self) -> u64
fn bits_per_value(&self) -> u64
Source§impl PerValueCompressor for OutOfLineBitpacking
impl PerValueCompressor for OutOfLineBitpacking
Source§fn compress(
&self,
data: DataBlock,
) -> Result<(PerValueDataBlock, CompressiveEncoding)>
fn compress( &self, data: DataBlock, ) -> Result<(PerValueDataBlock, CompressiveEncoding)>
Auto Trait Implementations§
impl Freeze for OutOfLineBitpacking
impl RefUnwindSafe for OutOfLineBitpacking
impl Send for OutOfLineBitpacking
impl Sync for OutOfLineBitpacking
impl Unpin for OutOfLineBitpacking
impl UnwindSafe for OutOfLineBitpacking
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more