pub struct MiniBlockChunk {
pub num_bytes: u16,
pub log_num_values: u8,
}
Expand description
Describes the size of a mini-block chunk of data
Mini-block chunks are designed to be small (just a few disk sectors) and contain a power-of-two number of values (except for the last chunk)
To enforce this we limit a chunk to 4Ki values and slightly less than 8KiB of compressed data. This means that even in the extreme case where we have 4 bytes of rep/def then we will have at most 24KiB of data (values, repetition, and definition) per mini-block.
Fields§
§num_bytes: u16
§log_num_values: u8
Implementations§
Source§impl MiniBlockChunk
impl MiniBlockChunk
Sourcepub fn num_values(&self, vals_in_prev_blocks: u64, total_num_values: u64) -> u64
pub fn num_values(&self, vals_in_prev_blocks: u64, total_num_values: u64) -> u64
Gets the number of values in this block
This requires vals_in_prev_blocks
and total_num_values
because the
last block in a page is a special case which stores 0 for log_num_values
and, in that case, the number of values is determined by subtracting
vals_in_prev_blocks
from total_num_values
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MiniBlockChunk
impl RefUnwindSafe for MiniBlockChunk
impl Send for MiniBlockChunk
impl Sync for MiniBlockChunk
impl Unpin for MiniBlockChunk
impl UnwindSafe for MiniBlockChunk
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
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>
Converts
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>
Converts
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