Struct ruzstd::fse::FSEDecoder
source · pub struct FSEDecoder<'table> {
pub state: Entry,
/* private fields */
}
Fields§
§state: Entry
An FSE state value represents an index in the FSE table.
Implementations§
source§impl<'t> FSEDecoder<'t>
impl<'t> FSEDecoder<'t>
sourcepub fn new(table: &'t FSETable) -> FSEDecoder<'_>
pub fn new(table: &'t FSETable) -> FSEDecoder<'_>
Initialize a new Finite State Entropy decoder.
sourcepub fn decode_symbol(&self) -> u8
pub fn decode_symbol(&self) -> u8
Returns the byte associated with the symbol the internal cursor is pointing at.
sourcepub fn init_state(
&mut self,
bits: &mut BitReaderReversed<'_>
) -> Result<(), FSEDecoderError>
pub fn init_state( &mut self, bits: &mut BitReaderReversed<'_> ) -> Result<(), FSEDecoderError>
Initialize internal state and prepare for decoding. After this, decode_symbol
can be called
to read the first symbol and update_state
can be called to prepare to read the next symbol.
sourcepub fn update_state(&mut self, bits: &mut BitReaderReversed<'_>)
pub fn update_state(&mut self, bits: &mut BitReaderReversed<'_>)
Advance the internal state to decode the next symbol in the bitstream.
Auto Trait Implementations§
impl<'table> Freeze for FSEDecoder<'table>
impl<'table> RefUnwindSafe for FSEDecoder<'table>
impl<'table> Send for FSEDecoder<'table>
impl<'table> Sync for FSEDecoder<'table>
impl<'table> Unpin for FSEDecoder<'table>
impl<'table> UnwindSafe for FSEDecoder<'table>
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