Skip to main content

EncodingType

Enum EncodingType 

Source
#[repr(u8)]
pub enum EncodingType {
Show 25 variants DeltaOfDelta = 0, Chimp = 1, Gorilla = 2, IntegerI64 = 3, IntegerU64 = 4, Dictionary = 5, Bitmap = 6, PlainF64 = 7, PlainI64 = 8, PlainU64 = 9, PlainBool = 10, PlainString = 11, Nullable = 12, Rle = 13, VarintI64 = 14, VarintU64 = 15, Chimp128 = 16, ForI64 = 17, ForU64 = 18, Patas = 19, Alp = 20, Pco = 21, PcoI64 = 22, PcoU64 = 23, DecimalI128 = 24,
}
Expand description

Discriminant tag stored as the first byte of every EncodedBlock.

Variants§

§

DeltaOfDelta = 0

Delta-of-delta for timestamps.

Kept as a selectable codec — it still wins on a perfect metronome — but no longer the default: see ColumnEncoder::encode_timestamps.

§

Chimp = 1

Chimp XOR for floats.

§

Gorilla = 2

Gorilla XOR for floats.

§

IntegerI64 = 3

Delta + ZigZag for i64.

§

IntegerU64 = 4

Delta + ZigZag for u64.

§

Dictionary = 5

Dictionary encoding for strings.

§

Bitmap = 6

Bitmap for booleans.

§

PlainF64 = 7

Plain f64.

§

PlainI64 = 8

Plain i64.

§

PlainU64 = 9

Plain u64.

§

PlainBool = 10

Plain bool.

§

PlainString = 11

Plain string.

§

Nullable = 12

Nullable wrapper — validity bitmap + inner encoded payload.

Payload format:

[inner_encoding: u8][total_count: u32 LE][validity_bitmap: ceil(count/8) bytes][inner_payload…]

Bit 1 in the validity bitmap means the value is present; 0 means null. Only non-null values are encoded in inner_payload.

§

Rle = 13

Run-length encoding for columns with repeated consecutive values.

§

VarintI64 = 14

Delta + ZigZag + LEB128 varint for i64.

Better than IntegerI64 for sparse or highly variable data where most deltas are small but occasional outliers would inflate the fixed bit width.

§

VarintU64 = 15

Delta + ZigZag + LEB128 varint for u64.

§

Chimp128 = 16

Chimp128 ring-buffer XOR for floats.

§

ForI64 = 17

Frame-of-Reference for narrow-range integers.

§

ForU64 = 18

Frame-of-Reference for narrow-range unsigned integers.

§

Patas = 19

Patas byte-aligned XOR for floats (VLDB 2023).

§

Alp = 20

ALP adaptive lossless floating-point compression (SIGMOD 2024).

A second opinion behind Pco for f64 columns whose values originated as decimals — which most sensor, meter and price data does. See crate::alp.

§

Pco = 21

Pcodec for floats (Loncaric 2025): mode recovery, delta, binned ANS. Leads every float candidate list — see crate::pco.

§

PcoI64 = 22

Pcodec for signed integers, and the default timestamp codec.

§

PcoU64 = 23

Pcodec for unsigned integers.

§

DecimalI128 = 24

Exact decimal mantissas (i128) — see crate::decimal.

Not a codec of its own so much as a shape: the narrow form, which is nearly every real decimal column, delegates straight to the i64 stack above and therefore inherits RLE, FOR, varint and pco.

Implementations§

Source§

impl EncodingType

Source

pub const ALL: &'static [Self]

Every encoding type, in tag order.

Complete by construction — generated from the same list as the enum itself, so a codec cannot be added without appearing here, and therefore in the fuzz corpus.

Source

pub fn from_tag(tag: u8) -> Result<Self>

Convert a u8 tag to an EncodingType.

§Errors

Returns EncodingError::UnsupportedEncoding for unknown tags.

Source

pub fn tag(self) -> u8

Return the u8 discriminant.

Trait Implementations§

Source§

impl Clone for EncodingType

Source§

fn clone(&self) -> EncodingType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EncodingType

Source§

impl Debug for EncodingType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for EncodingType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EncodingType

Source§

impl PartialEq for EncodingType

Source§

fn eq(&self, other: &EncodingType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EncodingType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more