Struct miniz_oxide::inflate::core::DecompressorOxide

source ·
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; 457],
}
Expand description

Main decompression struct.

Fields§

§state: State

Current state of the decompressor.

§num_bits: u32

Number of bits in the bit buffer.

§z_header0: u32

Zlib CMF

§z_header1: u32

Zlib FLG

§z_adler32: u32

Adler32 checksum from the zlib header.

§finish: u8

1 if the current block is the last block, 0 otherwise.

§block_type: u8

The type of the current block. or if in a dynamic block, which huffman table we are currently

§check_adler32: u32

1 if the adler32 value should be checked.

§dist: u32

Last match distance.

§counter: u32

Variable used for match length, symbols, and a number of other things.

§num_extra: u8

Number of extra bits for the last length or distance code.

§table_sizes: [u16; 3]

Number of entries in each huffman table.

§bit_buf: u64

Buffer 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; 457]

Huffman length codes.

Implementations§

source§

impl DecompressorOxide

source

pub fn new() -> DecompressorOxide

Create a new tinfl_decompressor with all fields set to 0.

source

pub fn init(&mut self)

Set the current state to Start.

source

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.

source

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

source§

fn clone(&self) -> DecompressorOxide

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for DecompressorOxide

source§

fn default() -> Self

Create a new tinfl_decompressor with all fields set to 0.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.