pub enum Method {
Trivial,
Crazy,
Simd16,
StdSimd8,
StdSimd16,
StdSimd32,
StdSimd8TwoStage,
StdSimd16TwoStage,
StdSimd32TwoStage,
}Expand description
Encoding method
These are different methods for COBS encoding. They all produce the same output, but have different runtime characteristics.
Variants§
Trivial
Simple loop, sequentially processing every byte without (explicitly) using SIMD instructions.
Crazy
Direct translation of unhinged C implementation from wikipedia
Simd16
Optimized version which uses an iterator producing blocks that internally uses SIMD intrinsics for finding zeros in the data.
StdSimd8
Versions that use std::Simd operations to be generic over vector length
StdSimd16
StdSimd32
StdSimd8TwoStage
Versions that use std::Simd operations to be generic over vector length and separate the zero-finding and splitting of large blocks, which may yield a small performance benefit
StdSimd16TwoStage
StdSimd32TwoStage
Trait Implementations§
source§impl IntoEnumIterator for Method
impl IntoEnumIterator for Method
type Iterator = MethodIter
fn iter() -> MethodIter ⓘ
Auto Trait Implementations§
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnwindSafe for Method
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