struct LsbBuffer {
bit_buffer: u64,
code_mask: u16,
code_size: u8,
bits: u8,
}Fields§
§bit_buffer: u64A buffer of individual bits. The oldest code is kept in the high-order bits.
code_mask: u16A precomputed mask for this code.
code_size: u8The current code size.
bits: u8The 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 peek_bits(&self, code: &mut [u16; 6]) -> usize
fn consume_bits(&mut self, code_cnt: u8)
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 UnsafeUnpin 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