Struct weezl::decode::DecodeState
source · struct DecodeState<CodeBuffer> {
min_size: u8,
table: Table,
buffer: Buffer,
last: Option<(u16, Link)>,
next_code: u16,
clear_code: u16,
end_code: u16,
has_ended: bool,
is_tiff: bool,
implicit_reset: bool,
code_buffer: CodeBuffer,
}
Fields§
§min_size: u8
The original minimum code size.
table: Table
The table of decoded codes.
buffer: Buffer
The buffer of decoded data.
last: Option<(u16, Link)>
The link which we are still decoding and its original code.
next_code: u16
The next code entry.
clear_code: u16
Code to reset all tables.
end_code: u16
Code to signal the end of the stream.
has_ended: bool
A stored flag if the end code has already appeared.
is_tiff: bool
If tiff then bumps are a single code sooner.
implicit_reset: bool
Do we allow stream to start without an explicit reset code?
code_buffer: CodeBuffer
The buffer for decoded words.
Implementations§
source§impl<C: CodeBuffer> DecodeState<C>
impl<C: CodeBuffer> DecodeState<C>
source§impl<C: CodeBuffer> DecodeState<C>
impl<C: CodeBuffer> DecodeState<C>
fn next_symbol(&mut self, inp: &mut &[u8]) -> Option<u16>
fn bump_code_size(&mut self)
fn refill_bits(&mut self, inp: &mut &[u8])
fn get_bits(&mut self) -> Option<u16>
Trait Implementations§
source§impl<C: CodeBuffer> Stateful for DecodeState<C>
impl<C: CodeBuffer> Stateful for DecodeState<C>
Auto Trait Implementations§
impl<CodeBuffer> Freeze for DecodeState<CodeBuffer>where
CodeBuffer: Freeze,
impl<CodeBuffer> RefUnwindSafe for DecodeState<CodeBuffer>where
CodeBuffer: RefUnwindSafe,
impl<CodeBuffer> Send for DecodeState<CodeBuffer>where
CodeBuffer: Send,
impl<CodeBuffer> Sync for DecodeState<CodeBuffer>where
CodeBuffer: Sync,
impl<CodeBuffer> Unpin for DecodeState<CodeBuffer>where
CodeBuffer: Unpin,
impl<CodeBuffer> UnwindSafe for DecodeState<CodeBuffer>where
CodeBuffer: UnwindSafe,
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