pub struct DecompressorOxide {Show 19 fields
    state: State,
    num_bits: u32,
    z_header0: u32,
    z_header1: u32,
    z_adler32: u32,
    finish: u8,
    block_type: u8,
    check_adler32: u32,
    dist: u32,
    counter: u32,
    num_extra: u8,
    table_sizes: [u16; 3],
    bit_buf: u64,
    tables: [HuffmanTable; 3],
    code_size_literal: [u8; 288],
    code_size_dist: [u8; 32],
    code_size_huffman: [u8; 19],
    raw_header: [u8; 4],
    len_codes: [u8; 512],
}Expand description
Main decompression struct.
Fields§
§state: StateCurrent state of the decompressor.
num_bits: u32Number of bits in the bit buffer.
z_header0: u32Zlib CMF
z_header1: u32Zlib FLG
z_adler32: u32Adler32 checksum from the zlib header.
finish: u81 if the current block is the last block, 0 otherwise.
block_type: u8The type of the current block. or if in a dynamic block, which huffman table we are currently
check_adler32: u321 if the adler32 value should be checked.
dist: u32Last match distance.
counter: u32Variable used for match length, symbols, and a number of other things.
num_extra: u8Number of extra bits for the last length or distance code.
table_sizes: [u16; 3]Number of entries in each huffman table.
bit_buf: u64Buffer of input data.
tables: [HuffmanTable; 3]Huffman tables.
code_size_literal: [u8; 288]§code_size_dist: [u8; 32]§code_size_huffman: [u8; 19]§raw_header: [u8; 4]Raw block header.
len_codes: [u8; 512]Huffman length codes.
Implementations§
Source§impl DecompressorOxide
 
impl DecompressorOxide
Sourcepub fn new() -> DecompressorOxide
 
pub fn new() -> DecompressorOxide
Create a new tinfl_decompressor with all fields set to 0.
Sourcepub fn adler32(&self) -> Option<u32>
 
pub fn adler32(&self) -> Option<u32>
Returns the adler32 checksum of the currently decompressed data. Note: Will return Some(1) if decompressing zlib but ignoring adler32.
Sourcepub fn adler32_header(&self) -> Option<u32>
 
pub fn adler32_header(&self) -> Option<u32>
Returns the adler32 that was read from the zlib header if it exists.
Trait Implementations§
Source§impl Clone for DecompressorOxide
 
impl Clone for DecompressorOxide
Source§fn clone(&self) -> DecompressorOxide
 
fn clone(&self) -> DecompressorOxide
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more