devela::_dep::symphonia::core::io

Trait ReadBitsRtl

pub trait ReadBitsRtl: FetchBitsRtl {
Show 14 methods // Provided methods fn realign(&mut self) { ... } fn ignore_bits(&mut self, num_bits: u32) -> Result<(), Error> { ... } fn ignore_bit(&mut self) -> Result<(), Error> { ... } fn read_bool(&mut self) -> Result<bool, Error> { ... } fn read_bit(&mut self) -> Result<u32, Error> { ... } fn read_bits_leq32(&mut self, bit_width: u32) -> Result<u32, Error> { ... } fn read_bits_leq32_signed(&mut self, bit_width: u32) -> Result<i32, Error> { ... } fn read_bits_leq64(&mut self, bit_width: u32) -> Result<u64, Error> { ... } fn read_bits_leq64_signed(&mut self, bit_width: u32) -> Result<i64, Error> { ... } fn read_unary_zeros(&mut self) -> Result<u32, Error> { ... } fn read_unary_zeros_capped(&mut self, limit: u32) -> Result<u32, Error> { ... } fn read_unary_ones(&mut self) -> Result<u32, Error> { ... } fn read_unary_ones_capped(&mut self, limit: u32) -> Result<u32, Error> { ... } fn read_codebook<E>( &mut self, codebook: &Codebook<E>, ) -> Result<(<E as CodebookEntry>::ValueType, u32), Error> where E: CodebookEntry { ... }
}
Available on crate feature dep_symphonia only.
Expand description

ReadBitsRtl reads bits from least-significant to most-significant.

Provided Methods§

fn realign(&mut self)

Discards any saved bits and resets the BitStream to prepare it for a byte-aligned read.

fn ignore_bits(&mut self, num_bits: u32) -> Result<(), Error>

Ignores the specified number of bits from the stream or returns an error.

fn ignore_bit(&mut self) -> Result<(), Error>

Ignores one bit from the stream or returns an error.

fn read_bool(&mut self) -> Result<bool, Error>

Read a single bit as a boolean value or returns an error.

fn read_bit(&mut self) -> Result<u32, Error>

Reads and returns a single bit or returns an error.

fn read_bits_leq32(&mut self, bit_width: u32) -> Result<u32, Error>

Reads and returns up to 32-bits or returns an error.

fn read_bits_leq32_signed(&mut self, bit_width: u32) -> Result<i32, Error>

Reads up to 32-bits and interprets them as a signed two’s complement integer or returns an error.

fn read_bits_leq64(&mut self, bit_width: u32) -> Result<u64, Error>

Reads and returns up to 64-bits or returns an error.

fn read_bits_leq64_signed(&mut self, bit_width: u32) -> Result<i64, Error>

Reads up to 64-bits and interprets them as a signed two’s complement integer or returns an error.

fn read_unary_zeros(&mut self) -> Result<u32, Error>

Reads and returns a unary zeros encoded integer or an error.

fn read_unary_zeros_capped(&mut self, limit: u32) -> Result<u32, Error>

Reads and returns a unary zeros encoded integer that is capped to a maximum value.

fn read_unary_ones(&mut self) -> Result<u32, Error>

Reads and returns a unary ones encoded integer or an error.

fn read_unary_ones_capped(&mut self, limit: u32) -> Result<u32, Error>

Reads and returns a unary ones encoded integer or an error.

fn read_codebook<E>( &mut self, codebook: &Codebook<E>, ) -> Result<(<E as CodebookEntry>::ValueType, u32), Error>
where E: CodebookEntry,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<'a> ReadBitsRtl for BitReaderRtl<'a>

§

impl<'a, B> ReadBitsRtl for BitStreamRtl<'a, B>
where B: ReadBytes,