struct LsbBuffer {
code_size: u8,
buffer: u64,
bits_in_buffer: u8,
}
Fields§
§code_size: u8
The current code length.
buffer: u64
The buffer bits.
bits_in_buffer: u8
The number of valid buffer bits.
Trait Implementations§
source§impl Buffer for LsbBuffer
impl Buffer for LsbBuffer
fn new(min_size: u8) -> Self
source§fn buffer_code(&mut self, code: u16)
fn buffer_code(&mut self, code: u16)
Insert a code into the buffer.
source§fn push_out(&mut self, out: &mut &mut [u8]) -> bool
fn push_out(&mut self, out: &mut &mut [u8]) -> bool
Push bytes if the buffer space is getting small.
source§fn flush_out(&mut self, out: &mut &mut [u8]) -> bool
fn flush_out(&mut self, out: &mut &mut [u8]) -> bool
Flush all full bytes, returning if at least one more byte remains.
source§fn buffer_pad(&mut self)
fn buffer_pad(&mut self)
Pad the buffer to a full byte.
source§fn bump_code_size(&mut self)
fn bump_code_size(&mut self)
Increase the maximum code size.
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