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

Fields

prefixes: Vec<Prefix<T>>

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

prefixes: Vec<Prefix<T::Signed>>
delta_moments: DeltaMoments<T>

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 f64s 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.