pub struct BitReader<R> { /* private fields */ }Expand description
Reads a binary Bzip2 file.
Implementations§
Source§impl<R: Read> BitReader<R>
impl<R: Read> BitReader<R>
Sourcepub fn bit(&mut self) -> Option<usize>
pub fn bit(&mut self) -> Option<usize>
Return bit as Option<usize> (1 or 0), or None if there is no more data to read
Sourcepub fn bool_bit(&mut self) -> Option<bool>
pub fn bool_bit(&mut self) -> Option<bool>
Return Option<Bool> true if the next bit is 1, false if 0, consuming the bit,
or None if there is no more data to read
Sourcepub fn bint(&mut self, n: usize) -> Option<usize>
pub fn bint(&mut self, n: usize) -> Option<usize>
Return Option<usize> of the next n bits, or None if there is no more data to read.
Sourcepub fn byte(&mut self) -> Option<u8>
pub fn byte(&mut self) -> Option<u8>
Returns a byte as an Option<u8>, or None if there is no more data to read. This is
a convenience function, and calls bint(8).
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for BitReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for BitReader<R>where
R: RefUnwindSafe,
impl<R> Send for BitReader<R>where
R: Send,
impl<R> Sync for BitReader<R>where
R: Sync,
impl<R> Unpin for BitReader<R>where
R: Unpin,
impl<R> UnwindSafe for BitReader<R>where
R: UnwindSafe,
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