pub struct FseEncoder { /* private fields */ }Expand description
Optimized FSE encoder using flat table layout.
The encoder uses a flat array indexed by (symbol, occurrence) for cache-efficient encoding. Symbol frequency counts are updated inline.
Implementations§
Source§impl FseEncoder
impl FseEncoder
Sourcepub fn from_decode_table(decode_table: &FseTable) -> Self
pub fn from_decode_table(decode_table: &FseTable) -> Self
Build an optimized FSE encoder from a decoding table.
Uses a flat table layout for cache efficiency.
Sourcepub fn init_state(&mut self, symbol: u8)
pub fn init_state(&mut self, symbol: u8)
Initialize the encoder with a symbol (first symbol sets initial state).
Sourcepub fn accuracy_log(&self) -> u8
pub fn accuracy_log(&self) -> u8
Get the accuracy log.
Sourcepub fn encode_symbol(&mut self, symbol: u8) -> (u32, u8)
pub fn encode_symbol(&mut self, symbol: u8) -> (u32, u8)
Encode a symbol, returning the bits to output.
Returns (bits_value, num_bits) where bits_value contains num_bits to output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FseEncoder
impl RefUnwindSafe for FseEncoder
impl Send for FseEncoder
impl Sync for FseEncoder
impl Unpin for FseEncoder
impl UnwindSafe for FseEncoder
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