struct BoolReader {
buf: Vec<u8>,
index: usize,
range: u32,
value: u32,
bit_count: u8,
}
Fields§
§buf: Vec<u8>
§index: usize
§range: u32
§value: u32
§bit_count: u8
Implementations§
source§impl BoolReader
impl BoolReader
pub(crate) fn new() -> BoolReader
pub(crate) fn init(&mut self, buf: Vec<u8>) -> ImageResult<()>
pub(crate) fn read_bool(&mut self, probability: u8) -> bool
pub(crate) fn read_literal(&mut self, n: u8) -> u8
pub(crate) fn read_magnitude_and_sign(&mut self, n: u8) -> i32
pub(crate) fn read_with_tree( &mut self, tree: &[i8], probs: &[u8], start: isize, ) -> i8
pub(crate) fn read_flag(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for BoolReader
impl RefUnwindSafe for BoolReader
impl Send for BoolReader
impl Sync for BoolReader
impl Unpin for BoolReader
impl UnwindSafe for BoolReader
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> 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