struct MsbBuffer {
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 MsbBuffer
impl CodeBuffer for MsbBuffer
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 MsbBuffer
impl RefUnwindSafe for MsbBuffer
impl Send for MsbBuffer
impl Sync for MsbBuffer
impl Unpin for MsbBuffer
impl UnsafeUnpin for MsbBuffer
impl UnwindSafe for MsbBuffer
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