struct LsbBuffer {
bit_buffer: u64,
code_mask: u16,
code_size: u8,
bits: u8,
}
Fields§
§bit_buffer: u64
A buffer of individual bits. The oldest code is kept in the high-order bits.
code_mask: u16
A precomputed mask for this code.
code_size: u8
The current code size.
bits: u8
The number of bits in the buffer.
Trait Implementations§
source§impl CodeBuffer for LsbBuffer
impl CodeBuffer for LsbBuffer
fn new(min_size: u8) -> Self
fn reset(&mut self, min_size: u8)
source§fn next_symbol(&mut self, inp: &mut &[u8]) -> Option<u16>
fn next_symbol(&mut self, inp: &mut &[u8]) -> Option<u16>
Retrieve the next symbol, refilling if necessary.
fn bump_code_size(&mut self)
source§fn refill_bits(&mut self, inp: &mut &[u8])
fn refill_bits(&mut self, inp: &mut &[u8])
Refill the internal buffer.
fn max_code(&self) -> u16
fn code_size(&self) -> u8
Auto Trait Implementations§
impl Freeze for LsbBuffer
impl RefUnwindSafe for LsbBuffer
impl Send for LsbBuffer
impl Sync for LsbBuffer
impl Unpin for LsbBuffer
impl UnwindSafe for LsbBuffer
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