pub struct BitReader<'a> { /* private fields */ }Expand description
VC-1 / WMV9 Bitstream Reader
Implementations§
Source§impl<'a> BitReader<'a>
impl<'a> BitReader<'a>
pub fn new(data: &'a [u8]) -> Self
Sourcepub fn new_at(data: &'a [u8], bit_offset: usize) -> Self
pub fn new_at(data: &'a [u8], bit_offset: usize) -> Self
Create a reader positioned at an arbitrary bit offset (MSB-first).
bit_offset=0 is identical to BitReader::new(data).
pub fn read_bits(&mut self, n: u8) -> Option<u32>
pub fn read_bit(&mut self) -> Option<bool>
pub fn read_bits_signed(&mut self, n: u8) -> Option<i32>
pub fn skip_bits(&mut self, n: u8)
Sourcepub fn skip_bits_usize(&mut self, n: usize)
pub fn skip_bits_usize(&mut self, n: usize)
Skip an arbitrary number of bits.
pub fn read_ue(&mut self) -> Option<u32>
pub fn read_se(&mut self) -> Option<i32>
pub fn byte_align(&mut self)
pub fn remaining_bytes(&self) -> usize
pub fn bits_read(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
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> 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