struct BitReader<'a> {
bytes: &'a [u8],
position: usize,
}Expand description
Reads bits from the buffered start of a stream.
Fields§
§bytes: &'a [u8]§position: usizeImplementations§
Source§impl<'a> BitReader<'a>
impl<'a> BitReader<'a>
fn read(&mut self, num_bits: usize) -> Result<u64, ParseError>
Sourcefn read_window_size(&mut self) -> Result<u8, ParseError>
fn read_window_size(&mut self) -> Result<u8, ParseError>
Reads the window size (log2 of the window in bytes) that starts every stream.
Sourcefn read_first_metablock_header(&mut self) -> Result<(), ParseError>
fn read_first_metablock_header(&mut self) -> Result<(), ParseError>
Reads the header of a catable stream’s first meta-block, after which the stream is byte aligned.
Auto Trait Implementations§
impl<'a> Freeze for BitReader<'a>
impl<'a> RefUnwindSafe for BitReader<'a>
impl<'a> Send for BitReader<'a>
impl<'a> Sync for BitReader<'a>
impl<'a> Unpin for BitReader<'a>
impl<'a> UnsafeUnpin for BitReader<'a>
impl<'a> UnwindSafe for BitReader<'a>
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