Struct q_compress::ChunkMetadata
source · [−]pub struct ChunkMetadata<T> where
T: NumberLike, {
pub n: usize,
pub compressed_body_size: usize,
pub prefix_metadata: PrefixMetadata<T>,
}
Expand description
The metadata of a .qco file chunk.
Each 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.
One can also create a rough histogram (or a histogram of deltas, if
delta encoding was used) by aggregating chunk metadata.
Fields
n: usize
The count of numbers in the chunk.
compressed_body_size: usize
The compressed byte length of the compressed numbers that immediately follow this chunk metadata section.
prefix_metadata: PrefixMetadata<T>
How the chunk body was compressed.
Implementations
sourceimpl<T> ChunkMetadata<T> where
T: NumberLike,
impl<T> ChunkMetadata<T> where
T: NumberLike,
pub fn parse_from(
reader: &mut BitReader<'_>,
flags: &Flags
) -> QCompressResult<Self>
pub fn write_to(&self, writer: &mut BitWriter, flags: &Flags)
Trait Implementations
sourceimpl<T: Clone> Clone for ChunkMetadata<T> where
T: NumberLike,
impl<T: Clone> Clone for ChunkMetadata<T> where
T: NumberLike,
sourcefn clone(&self) -> ChunkMetadata<T>
fn clone(&self) -> ChunkMetadata<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for ChunkMetadata<T> where
T: NumberLike,
impl<T: Debug> Debug for ChunkMetadata<T> where
T: NumberLike,
sourceimpl<T: PartialEq> PartialEq<ChunkMetadata<T>> for ChunkMetadata<T> where
T: NumberLike,
impl<T: PartialEq> PartialEq<ChunkMetadata<T>> for ChunkMetadata<T> where
T: NumberLike,
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ChunkMetadata<T>) -> bool
fn ne(&self, other: &ChunkMetadata<T>) -> bool
This method tests for !=
.
impl<T> StructuralPartialEq for ChunkMetadata<T> where
T: NumberLike,
Auto Trait Implementations
impl<T> RefUnwindSafe for ChunkMetadata<T> where
T: RefUnwindSafe,
<T as NumberLike>::Signed: RefUnwindSafe,
impl<T> Send for ChunkMetadata<T> where
T: Send,
<T as NumberLike>::Signed: Send,
impl<T> Sync for ChunkMetadata<T> where
T: Sync,
<T as NumberLike>::Signed: Sync,
impl<T> Unpin for ChunkMetadata<T> where
T: Unpin,
<T as NumberLike>::Signed: Unpin,
impl<T> UnwindSafe for ChunkMetadata<T> where
T: UnwindSafe,
<T as NumberLike>::Signed: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more