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.
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.
We do use this as a block compressor currently.
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_offsetHowever, 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.
Implementations§
Trait Implementations§
Source§impl BlockDecompressor for OutOfLineBitpacking
impl BlockDecompressor for OutOfLineBitpacking
fn decompress(&self, data: LanceBuffer, num_values: u64) -> Result<DataBlock>
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