Struct q_compress::ChunkMetadata
source · #[non_exhaustive]pub struct ChunkMetadata<T: NumberLike> {
pub n: usize,
pub compressed_body_size: usize,
pub prefix_metadata: PrefixMetadata<T>,
/* private fields */
}
Expand description
The metadata of a Quantile-compressed chunk.
One can also create a rough histogram (or a histogram of deltas, if delta encoding was used) by aggregating chunk metadata.
Each .qco file may contain multiple metadata sections, so to count the
entries, one must sum the count n
for each chunk metadata. This can
be done easily - see the fast_seeking.rs example. For wrapped data,
n
and compressed_body_size
are not stored.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.n: usize
The count of numbers in the chunk. Not available in wrapped mode.
compressed_body_size: usize
The compressed byte length of the body that immediately follow this chunk metadata section. Not available in wrapped mode.
prefix_metadata: PrefixMetadata<T>
How the chunk body was compressed.
Implementations§
source§impl<T: NumberLike> ChunkMetadata<T>
impl<T: NumberLike> ChunkMetadata<T>
pub fn parse_from( reader: &mut BitReader<'_>, flags: &Flags ) -> QCompressResult<Self>
pub fn write_to(&self, writer: &mut BitWriter, flags: &Flags)
Trait Implementations§
source§impl<T: Clone + NumberLike> Clone for ChunkMetadata<T>where
T::Signed: Clone,
impl<T: Clone + NumberLike> Clone for ChunkMetadata<T>where T::Signed: Clone,
source§fn clone(&self) -> ChunkMetadata<T>
fn clone(&self) -> ChunkMetadata<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug + NumberLike> Debug for ChunkMetadata<T>where
T::Signed: Debug,
impl<T: Debug + NumberLike> Debug for ChunkMetadata<T>where T::Signed: Debug,
source§impl<T: PartialEq + NumberLike> PartialEq<ChunkMetadata<T>> for ChunkMetadata<T>where
T::Signed: PartialEq,
impl<T: PartialEq + NumberLike> PartialEq<ChunkMetadata<T>> for ChunkMetadata<T>where T::Signed: PartialEq,
source§fn eq(&self, other: &ChunkMetadata<T>) -> bool
fn eq(&self, other: &ChunkMetadata<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: NumberLike> StructuralPartialEq for ChunkMetadata<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ChunkMetadata<T>where T: RefUnwindSafe, <T as NumberLike>::Signed: RefUnwindSafe, <T as NumberLike>::Unsigned: RefUnwindSafe,
impl<T> Send for ChunkMetadata<T>where T: Send, <T as NumberLike>::Signed: Send, <T as NumberLike>::Unsigned: Send,
impl<T> Sync for ChunkMetadata<T>where T: Sync, <T as NumberLike>::Signed: Sync, <T as NumberLike>::Unsigned: Sync,
impl<T> Unpin for ChunkMetadata<T>where T: Unpin, <T as NumberLike>::Signed: Unpin, <T as NumberLike>::Unsigned: Unpin,
impl<T> UnwindSafe for ChunkMetadata<T>where T: UnwindSafe, <T as NumberLike>::Signed: UnwindSafe, <T as NumberLike>::Unsigned: UnwindSafe,
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