pub struct VlcTable { /* private fields */ }Expand description
Flat decode table built from Huffman codes.
Implementations§
Source§impl VlcTable
impl VlcTable
Sourcepub fn build(codes: &[(u32, u8, i32)], max_bits: u8) -> Self
pub fn build(codes: &[(u32, u8, i32)], max_bits: u8) -> Self
Build from (code_bits, code_len, symbol) triples.
Sourcepub fn decode(&self, br: &mut BitReader<'_>) -> Option<i32>
pub fn decode(&self, br: &mut BitReader<'_>) -> Option<i32>
Decode one symbol. Advances the reader by the code length.
pub fn max_bits(&self) -> u8
Auto Trait Implementations§
impl Freeze for VlcTable
impl RefUnwindSafe for VlcTable
impl Send for VlcTable
impl Sync for VlcTable
impl Unpin for VlcTable
impl UnsafeUnpin for VlcTable
impl UnwindSafe for VlcTable
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