#[non_exhaustive]pub enum QuantMode {
Bits8,
Bits3_5,
Bits2_5,
}Available on crate feature
alloc only.Expand description
Quantization bit depth. Controls the quality/compression tradeoff.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bits8
8-bit: 256 levels, 4 values per u32. Near-lossless (~0.4% max error). ~8x compression vs f64. Simple byte packing.
Bits3_5
3.5-bit: 11 levels, 7 values per u32. Aggressive (~10% max error). ~14x compression vs f64. Base-11 mixed-radix packing.
Bits2_5
2.5-bit: 5 levels, 13 values per u32. Ultra-aggressive (~20% max error). ~21x compression vs f64. Base-5 mixed-radix packing.
Trait Implementations§
impl Copy for QuantMode
impl Eq for QuantMode
impl StructuralPartialEq for QuantMode
Auto Trait Implementations§
impl Freeze for QuantMode
impl RefUnwindSafe for QuantMode
impl Send for QuantMode
impl Sync for QuantMode
impl Unpin for QuantMode
impl UnsafeUnpin for QuantMode
impl UnwindSafe for QuantMode
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> 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