pub enum CompressedData {
Sparse {
indices: Vec<usize>,
values: Vec<f32>,
},
Quantized {
values: Vec<u8>,
scale: f32,
zero_point: u8,
},
Signs {
signs: Vec<bool>,
norm: f32,
},
LowRank {
left_factor: Vec<f32>,
right_factor: Vec<f32>,
rank: usize,
},
Sketch {
sketch: Vec<f32>,
hash_a: Vec<u32>,
hash_b: Vec<u32>,
},
Ternary {
values: Vec<i8>,
scale: f32,
},
Bimodal {
bin_indices: Vec<u8>,
bin_centers: Vec<f32>,
},
Natural {
values: Vec<f32>,
frequencies: Vec<u32>,
codebook: Vec<f32>,
},
EF21 {
compressed_values: Vec<f32>,
error_feedback: Vec<f32>,
},
}Expand description
Compressed data types
Variants§
Sparse
Sparse representation with indices and values
Quantized
Quantized values
Signs
Sign representation
LowRank
Low-rank factors
Sketch
Sketch representation
Ternary
Ternary representation (-1, 0, +1)
Bimodal
Bimodal quantization bins
Natural
Natural compression (frequency-based)
EF21
EF21 compressed representation
Trait Implementations§
Source§impl Clone for CompressedData
impl Clone for CompressedData
Source§fn clone(&self) -> CompressedData
fn clone(&self) -> CompressedData
Returns a duplicate 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 Debug for CompressedData
impl Debug for CompressedData
Source§impl<'de> Deserialize<'de> for CompressedData
impl<'de> Deserialize<'de> for CompressedData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompressedData
impl RefUnwindSafe for CompressedData
impl Send for CompressedData
impl Sync for CompressedData
impl Unpin for CompressedData
impl UnsafeUnpin for CompressedData
impl UnwindSafe for CompressedData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more