pub enum CodecProfile {
Raw,
Q8,
Q4,
Turbo,
Fib,
Polar,
Qjl,
}Expand description
Codec profiles available for governance selection.
Variants§
Raw
Uncompressed representation
Q8
8-bit quantization
Q4
4-bit quantization
Turbo
Turbo-quant accelerated codec (symmetric; reconstructs original vector)
Fib
Fibonacci-weighted precision codec (symmetric; reconstructs original vector)
Polar
Polar-only quantization (asymmetric; score_inner_product / score_l2 only)
Qjl
QJL random-projection sketch (asymmetric; fixed-size inner-product estimator)
Implementations§
Source§impl CodecProfile
impl CodecProfile
Sourcepub fn default_degradation_threshold(&self) -> f64
pub fn default_degradation_threshold(&self) -> f64
Returns the default degradation threshold for this profile.
Sourcepub fn is_high_fidelity(&self) -> bool
pub fn is_high_fidelity(&self) -> bool
Returns true if this is a high-fidelity profile.
Sourcepub fn is_asymmetric(&self) -> bool
pub fn is_asymmetric(&self) -> bool
Returns true if this codec is asymmetric (cannot reconstruct the original vector from compressed bytes alone). For asymmetric codecs the wire format is a sketch/code, and the caller must use score_inner_product / score_l2 against a known query.
Sourcepub fn estimated_compression_ratio(&self) -> f64
pub fn estimated_compression_ratio(&self) -> f64
Returns estimated compression ratio for this profile.
Trait Implementations§
Source§impl Clone for CodecProfile
impl Clone for CodecProfile
Source§fn clone(&self) -> CodecProfile
fn clone(&self) -> CodecProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecProfile
impl Debug for CodecProfile
Source§impl<'de> Deserialize<'de> for CodecProfile
impl<'de> Deserialize<'de> for CodecProfile
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>,
Source§impl Display for CodecProfile
impl Display for CodecProfile
Source§impl Hash for CodecProfile
impl Hash for CodecProfile
Source§impl PartialEq for CodecProfile
impl PartialEq for CodecProfile
Source§fn eq(&self, other: &CodecProfile) -> bool
fn eq(&self, other: &CodecProfile) -> bool
self and other values to be equal, and is used by ==.