Trait av_bitstream::bitread::BitRead
source · [−]pub trait BitRead<'a>: BitReadInternal + Copy {
fn new(_: &'a [u8]) -> Self;
fn consumed(&self) -> usize;
fn available(&self) -> usize;
fn skip_bits(&mut self, size: usize);
fn get_bit(&mut self) -> bool { ... }
fn get_bits_64(&mut self, n: usize) -> u64 { ... }
fn get_bits_32(&mut self, n: usize) -> u32 { ... }
fn peek_bit(&mut self) -> bool { ... }
fn peek_bits_32(&mut self, n: usize) -> u32 { ... }
fn peek_bits_64(&self, n: usize) -> u64 { ... }
fn align_bits(&mut self) { ... }
}
Expand description
Used to define a bitreader.
Required Methods
Provided Methods
sourcefn get_bits_64(&mut self, n: usize) -> u64
fn get_bits_64(&mut self, n: usize) -> u64
Returns n bits from the internal buffer as a 64-bit sequence.
sourcefn get_bits_32(&mut self, n: usize) -> u32
fn get_bits_32(&mut self, n: usize) -> u32
Returns n bits from the internal buffer as a 32-bit sequence.
sourcefn peek_bits_32(&mut self, n: usize) -> u32
fn peek_bits_32(&mut self, n: usize) -> u32
Peeks the next 32-bit sequence present in the internal buffer.
sourcefn peek_bits_64(&self, n: usize) -> u64
fn peek_bits_64(&self, n: usize) -> u64
Peeks the next 64-bit sequence present in the internal buffer.
sourcefn align_bits(&mut self)
fn align_bits(&mut self)
Aligns the bits present in the internal buffer.