pub struct HuffmanDecoder {
pub main_table: Option<HuffmanTable>,
pub dist_table: Option<HuffmanTable>,
pub low_dist_table: Option<HuffmanTable>,
pub len_table: Option<HuffmanTable>,
/* private fields */
}Expand description
Huffman decoder that can read code lengths from the stream.
Fields§
§main_table: Option<HuffmanTable>Main code table (literals + lengths)
dist_table: Option<HuffmanTable>Distance/offset table
low_dist_table: Option<HuffmanTable>Low distance table
len_table: Option<HuffmanTable>Length table
Implementations§
Source§impl HuffmanDecoder
impl HuffmanDecoder
pub fn new() -> Self
Sourcepub fn reset_tables(&mut self)
pub fn reset_tables(&mut self)
Reset the length table.
Sourcepub fn read_tables(&mut self, reader: &mut BitReader<'_>) -> Result<()>
pub fn read_tables(&mut self, reader: &mut BitReader<'_>) -> Result<()>
Read code lengths from the bit stream and build tables. This matches the RAR3/4 format.
Sourcepub fn read_tables_after_header(
&mut self,
reader: &mut BitReader<'_>,
) -> Result<()>
pub fn read_tables_after_header( &mut self, reader: &mut BitReader<'_>, ) -> Result<()>
Read tables after header bits have been consumed.
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