Struct jpeg_decoder::huffman::HuffmanDecoder
source · pub struct HuffmanDecoder {
bits: u64,
num_bits: u8,
marker: Option<Marker>,
}
Fields§
§bits: u64
§num_bits: u8
§marker: Option<Marker>
Implementations§
source§impl HuffmanDecoder
impl HuffmanDecoder
pub fn new() -> HuffmanDecoder
pub fn decode<R: Read>( &mut self, reader: &mut R, table: &HuffmanTable, ) -> Result<u8, Error>
pub fn decode_fast_ac<R: Read>( &mut self, reader: &mut R, table: &HuffmanTable, ) -> Result<Option<(i16, u8)>, Error>
pub fn get_bits<R: Read>( &mut self, reader: &mut R, count: u8, ) -> Result<u16, Error>
pub fn receive_extend<R: Read>( &mut self, reader: &mut R, count: u8, ) -> Result<i16, Error>
pub fn reset(&mut self)
pub fn take_marker<R: Read>( &mut self, reader: &mut R, ) -> Result<Option<Marker>, Error>
fn peek_bits(&mut self, count: u8) -> u16
fn consume_bits(&mut self, count: u8)
fn read_bits<R: Read>(&mut self, reader: &mut R) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HuffmanDecoder
impl RefUnwindSafe for HuffmanDecoder
impl Send for HuffmanDecoder
impl Sync for HuffmanDecoder
impl Unpin for HuffmanDecoder
impl UnwindSafe for HuffmanDecoder
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