pub struct ExactBits<'a> { /* private fields */ }Expand description
MSB-first bit reader with exact end-of-data semantics (see module docs).
Implementations§
Source§impl<'a> ExactBits<'a>
impl<'a> ExactBits<'a>
pub fn new(data: &'a [u8]) -> Self
Sourcepub fn dead_row(&self) -> Option<usize>
pub fn dead_row(&self) -> Option<usize>
The first row (of a decode_predictive call) that needed bits past the end of the
data, i.e. how much of the image is real: rows from here on are frozen predictors.
Sourcepub fn huff(&mut self, t: &DirectHuff) -> u32
pub fn huff(&mut self, t: &DirectHuff) -> u32
Decode one symbol.
Sourcepub fn diff(&mut self, t: &DirectHuff) -> i32
pub fn diff(&mut self, t: &DirectHuff) -> i32
Decode one symbol + difference (exact slow path).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for ExactBits<'a>
impl<'a> Freeze for ExactBits<'a>
impl<'a> RefUnwindSafe for ExactBits<'a>
impl<'a> Send for ExactBits<'a>
impl<'a> Sync for ExactBits<'a>
impl<'a> Unpin for ExactBits<'a>
impl<'a> UnsafeUnpin for ExactBits<'a>
impl<'a> UnwindSafe for ExactBits<'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