Enum q_compress::PrefixMetadata
source · pub enum PrefixMetadata<T: NumberLike> {
Simple {
prefixes: Vec<Prefix<T>>,
},
Delta {
prefixes: Vec<Prefix<T::Signed>>,
},
}
Expand description
A wrapper for prefixes in the two cases cases: delta encoded or not.
This is the part of chunk metadata that describes how the data was compressed - the Huffman codes used and what ranges they specify.
Variants§
Simple
Simple
prefix metadata corresponds to the case when delta encoding is
off (delta_encoding_order
of 0).
It simply contains prefixes of the same data type being compressed.
Delta
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Delta
prefix metadata corresponds to the case when delta encoding is
on.
It contains prefixes of the associated SignedLike
type (what the
deltas are expressed as). For instance, a chunk of delta-encoded f64
s
with delta_encoding_order: 1
will have prefixes of type i64
, where a delta of n indicates a change
of n * machine epsilon from the last float.
Trait Implementations§
source§impl<T: Clone + NumberLike> Clone for PrefixMetadata<T>where
T::Signed: Clone,
impl<T: Clone + NumberLike> Clone for PrefixMetadata<T>where T::Signed: Clone,
source§fn clone(&self) -> PrefixMetadata<T>
fn clone(&self) -> PrefixMetadata<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 PrefixMetadata<T>where
T::Signed: Debug,
impl<T: Debug + NumberLike> Debug for PrefixMetadata<T>where T::Signed: Debug,
source§impl<T: PartialEq + NumberLike> PartialEq<PrefixMetadata<T>> for PrefixMetadata<T>where
T::Signed: PartialEq,
impl<T: PartialEq + NumberLike> PartialEq<PrefixMetadata<T>> for PrefixMetadata<T>where T::Signed: PartialEq,
source§fn eq(&self, other: &PrefixMetadata<T>) -> bool
fn eq(&self, other: &PrefixMetadata<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: NumberLike> StructuralPartialEq for PrefixMetadata<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PrefixMetadata<T>where T: RefUnwindSafe, <T as NumberLike>::Signed: RefUnwindSafe, <T as NumberLike>::Unsigned: RefUnwindSafe,
impl<T> Send for PrefixMetadata<T>where T: Send, <T as NumberLike>::Signed: Send, <T as NumberLike>::Unsigned: Send,
impl<T> Sync for PrefixMetadata<T>where T: Sync, <T as NumberLike>::Signed: Sync, <T as NumberLike>::Unsigned: Sync,
impl<T> Unpin for PrefixMetadata<T>where T: Unpin, <T as NumberLike>::Signed: Unpin, <T as NumberLike>::Unsigned: Unpin,
impl<T> UnwindSafe for PrefixMetadata<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