Enum q_compress::PrefixMetadata
source · [−]pub enum PrefixMetadata<T: NumberLike> {
Simple {
prefixes: Vec<Prefix<T>>,
},
Delta {
prefixes: Vec<Prefix<T::Signed>>,
delta_moments: DeltaMoments<T>,
},
}
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
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.
Delta
prefix info also contains a Vec
of initial delta moments at
the start of the chunk, each of which is also a SignedLike
.
Trait Implementations
sourceimpl<T: Clone + NumberLike> Clone for PrefixMetadata<T> where
T::Signed: Clone,
impl<T: Clone + NumberLike> Clone for PrefixMetadata<T> where
T::Signed: Clone,
sourcefn clone(&self) -> PrefixMetadata<T>
fn clone(&self) -> PrefixMetadata<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 + NumberLike> Debug for PrefixMetadata<T> where
T::Signed: Debug,
impl<T: Debug + NumberLike> Debug for PrefixMetadata<T> where
T::Signed: Debug,
sourceimpl<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,
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &PrefixMetadata<T>) -> bool
fn ne(&self, other: &PrefixMetadata<T>) -> bool
This method tests for !=
.
impl<T: NumberLike> StructuralPartialEq for PrefixMetadata<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for PrefixMetadata<T> where
T: RefUnwindSafe,
<T as NumberLike>::Signed: RefUnwindSafe,
impl<T> Send for PrefixMetadata<T> where
T: Send,
<T as NumberLike>::Signed: Send,
impl<T> Sync for PrefixMetadata<T> where
T: Sync,
<T as NumberLike>::Signed: Sync,
impl<T> Unpin for PrefixMetadata<T> where
T: Unpin,
<T as NumberLike>::Signed: Unpin,
impl<T> UnwindSafe for PrefixMetadata<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