pub struct TableArithmeticDecoder<'a> { /* private fields */ }Expand description
Table-based arithmetic decoder counterpart.
Reads bytes from a pre-encoded stream and reconstructs symbols using the same probability table used during encoding.
Implementations§
Source§impl<'a> TableArithmeticDecoder<'a>
impl<'a> TableArithmeticDecoder<'a>
Sourcepub fn new(data: &'a [u8]) -> Self
pub fn new(data: &'a [u8]) -> Self
Create a decoder over data.
Reads the initial 4-byte code word.
Sourcepub fn decode_symbol(&mut self, entry: &ProbTableEntry) -> bool
pub fn decode_symbol(&mut self, entry: &ProbTableEntry) -> bool
Decode one symbol.
Returns true for the high partition, false for the low partition.
Trait Implementations§
Source§impl<'a> Clone for TableArithmeticDecoder<'a>
impl<'a> Clone for TableArithmeticDecoder<'a>
Source§fn clone(&self) -> TableArithmeticDecoder<'a>
fn clone(&self) -> TableArithmeticDecoder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for TableArithmeticDecoder<'a>
impl<'a> RefUnwindSafe for TableArithmeticDecoder<'a>
impl<'a> Send for TableArithmeticDecoder<'a>
impl<'a> Sync for TableArithmeticDecoder<'a>
impl<'a> Unpin for TableArithmeticDecoder<'a>
impl<'a> UnsafeUnpin for TableArithmeticDecoder<'a>
impl<'a> UnwindSafe for TableArithmeticDecoder<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more