Struct symphonia_core::io::BitReaderLtr
source · pub struct BitReaderLtr<'a> { /* private fields */ }
Expand description
BitReaderLtr
reads bits from most-significant to least-significant from any &[u8]
.
Stated another way, if N-bits are read from a BitReaderLtr
then bit 0, the first bit read,
is the most-significant bit, and bit N-1, the last bit read, is the least-significant.
Implementations§
Trait Implementations§
source§impl<'a> FiniteBitStream for BitReaderLtr<'a>
impl<'a> FiniteBitStream for BitReaderLtr<'a>
source§impl<'a> ReadBitsLtr for BitReaderLtr<'a>
impl<'a> ReadBitsLtr for BitReaderLtr<'a>
source§fn realign(&mut self)
fn realign(&mut self)
Discards any saved bits and resets the
BitStream
to prepare it for a byte-aligned read.source§fn ignore_bits(&mut self, num_bits: u32) -> Result<()>
fn ignore_bits(&mut self, num_bits: u32) -> Result<()>
Ignores the specified number of bits from the stream or returns an error.
source§fn ignore_bit(&mut self) -> Result<()>
fn ignore_bit(&mut self) -> Result<()>
Ignores one bit from the stream or returns an error.
source§fn read_bool(&mut self) -> Result<bool>
fn read_bool(&mut self) -> Result<bool>
Read a single bit as a boolean value or returns an error.
source§fn read_bits_leq32(&mut self, bit_width: u32) -> Result<u32>
fn read_bits_leq32(&mut self, bit_width: u32) -> Result<u32>
Reads and returns up to 32-bits or returns an error.
source§fn read_bits_leq32_signed(&mut self, bit_width: u32) -> Result<i32>
fn read_bits_leq32_signed(&mut self, bit_width: u32) -> Result<i32>
Reads up to 32-bits and interprets them as a signed two’s complement integer or returns an
error.
source§fn read_bits_leq64(&mut self, bit_width: u32) -> Result<u64>
fn read_bits_leq64(&mut self, bit_width: u32) -> Result<u64>
Reads and returns up to 64-bits or returns an error.
source§fn read_bits_leq64_signed(&mut self, bit_width: u32) -> Result<i64>
fn read_bits_leq64_signed(&mut self, bit_width: u32) -> Result<i64>
Reads up to 64-bits and interprets them as a signed two’s complement integer or returns an
error.
source§fn read_unary_zeros(&mut self) -> Result<u32>
fn read_unary_zeros(&mut self) -> Result<u32>
Reads and returns a unary zeros encoded integer or an error.
source§fn read_unary_zeros_capped(&mut self, limit: u32) -> Result<u32>
fn read_unary_zeros_capped(&mut self, limit: u32) -> Result<u32>
Reads and returns a unary zeros encoded integer that is capped to a maximum value.
source§fn read_unary_ones(&mut self) -> Result<u32>
fn read_unary_ones(&mut self) -> Result<u32>
Reads and returns a unary ones encoded integer or an error.
source§fn read_unary_ones_capped(&mut self, limit: u32) -> Result<u32>
fn read_unary_ones_capped(&mut self, limit: u32) -> Result<u32>
Reads and returns a unary ones encoded integer that is capped to a maximum value.
source§fn read_codebook<E: CodebookEntry>(
&mut self,
codebook: &Codebook<E>,
) -> Result<(E::ValueType, u32)>
fn read_codebook<E: CodebookEntry>( &mut self, codebook: &Codebook<E>, ) -> Result<(E::ValueType, u32)>
Reads a codebook value from the
BitStream
using the provided Codebook
and returns the
decoded value or an error.Auto Trait Implementations§
impl<'a> Freeze for BitReaderLtr<'a>
impl<'a> RefUnwindSafe for BitReaderLtr<'a>
impl<'a> Send for BitReaderLtr<'a>
impl<'a> Sync for BitReaderLtr<'a>
impl<'a> Unpin for BitReaderLtr<'a>
impl<'a> UnwindSafe for BitReaderLtr<'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