pub struct FseCTable {
pub table_log: u32,
pub state_table: Vec<u16>,
pub symbol_tt: Vec<SymbolTT>,
pub max_symbol: usize,
}Expand description
Compiled FSE compression table.
Fields§
§table_log: u32§state_table: Vec<u16>§symbol_tt: Vec<SymbolTT>§max_symbol: usizeImplementations§
Source§impl FseCTable
impl FseCTable
Sourcepub fn build(norm: &[i16], max_symbol: usize, table_log: u32) -> Self
pub fn build(norm: &[i16], max_symbol: usize, table_log: u32) -> Self
Build an FSE compression table from normalized counts. Ported from FSE_buildCTable_wksp() in fse_compress.c.
Sourcepub fn build_rle(symbol: u8) -> Self
pub fn build_rle(symbol: u8) -> Self
Build an RLE compression table: single symbol, 0 bits per encode. init_state returns 0, encode_symbol always returns (0, 0, 0). table_log = 0, matching the decoder’s RLE behavior.
Sourcepub fn init_state(&self, symbol: usize) -> u32
pub fn init_state(&self, symbol: usize) -> u32
Initialize FSE state for the first symbol (FSE_initCState2).
Auto Trait Implementations§
impl Freeze for FseCTable
impl RefUnwindSafe for FseCTable
impl Send for FseCTable
impl Sync for FseCTable
impl Unpin for FseCTable
impl UnsafeUnpin for FseCTable
impl UnwindSafe for FseCTable
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> 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