pub struct ArithmeticDecoder<T: Reader> {
pub reader: Rc<RefCell<T>>,
pub value: u32,
pub length: u32,
}Expand description
Fields§
§reader: Rc<RefCell<T>>The data to read from
value: u32The current value
length: u32The current length
Implementations§
Source§impl<T: Reader> ArithmeticDecoder<T>
impl<T: Reader> ArithmeticDecoder<T>
Sourcepub fn decode_bit(&mut self, m: &mut ArithmeticBitModel) -> u32
pub fn decode_bit(&mut self, m: &mut ArithmeticBitModel) -> u32
Sourcepub fn decode_symbol(&mut self, m: &mut ArithmeticModel) -> u32
pub fn decode_symbol(&mut self, m: &mut ArithmeticModel) -> u32
Sourcepub fn read_short(&mut self) -> u16
pub fn read_short(&mut self) -> u16
§Returns
The decoded short
Sourcepub fn read_float(&mut self) -> f32
pub fn read_float(&mut self) -> f32
§Returns
The decoded float
Sourcepub fn read_int64(&mut self) -> u64
pub fn read_int64(&mut self) -> u64
§Returns
The decoded int64
Sourcepub fn read_double(&mut self) -> f64
pub fn read_double(&mut self) -> f64
§Returns
The decoded double
Sourcepub fn renorm_dec_interval(&mut self)
pub fn renorm_dec_interval(&mut self)
Renormalize the decoder interval
Trait Implementations§
Source§impl<T: Clone + Reader> Clone for ArithmeticDecoder<T>
impl<T: Clone + Reader> Clone for ArithmeticDecoder<T>
Source§fn clone(&self) -> ArithmeticDecoder<T>
fn clone(&self) -> ArithmeticDecoder<T>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Default + Reader> Default for ArithmeticDecoder<T>
impl<T: Default + Reader> Default for ArithmeticDecoder<T>
Source§fn default() -> ArithmeticDecoder<T>
fn default() -> ArithmeticDecoder<T>
Returns the “default value” for a type. Read more
impl<T: Reader> StructuralPartialEq for ArithmeticDecoder<T>
Auto Trait Implementations§
impl<T> Freeze for ArithmeticDecoder<T>
impl<T> !RefUnwindSafe for ArithmeticDecoder<T>
impl<T> !Send for ArithmeticDecoder<T>
impl<T> !Sync for ArithmeticDecoder<T>
impl<T> Unpin for ArithmeticDecoder<T>
impl<T> !UnwindSafe for ArithmeticDecoder<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().