struct MsbBuffer {
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 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 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 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