Struct miniz_oxide::deflate::core::HuffmanOxide

source ·
struct HuffmanOxide {
    pub count: [[u16; 288]; 3],
    pub codes: [[u16; 288]; 3],
    pub code_sizes: [[u8; 288]; 3],
}
Expand description

A struct containing data about huffman codes and symbol frequencies.

NOTE: Only the literal/lengths have enough symbols to actually use the full array. It’s unclear why it’s defined like this in miniz, it could be for cache/alignment reasons.

Fields§

§count: [[u16; 288]; 3]

Number of occurrences of each symbol.

§codes: [[u16; 288]; 3]

The bits of the huffman code assigned to the symbol

§code_sizes: [[u8; 288]; 3]

The length of the huffman code assigned to the symbol.

Implementations§

source§

impl HuffmanOxide

source

fn radix_sort_symbols<'a>( symbols0: &'a mut [SymFreq], symbols1: &'a mut [SymFreq], ) -> &'a mut [SymFreq]

source

fn calculate_minimum_redundancy(symbols: &mut [SymFreq])

source

fn enforce_max_code_size( num_codes: &mut [i32], code_list_len: usize, max_code_size: usize, )

source

fn optimize_table( &mut self, table_num: usize, table_len: usize, code_size_limit: usize, static_table: bool, )

source

fn start_static_block(&mut self, output: &mut OutputBufferOxide<'_>)

source

fn start_dynamic_block( &mut self, output: &mut OutputBufferOxide<'_>, ) -> Result<(), Error>

Trait Implementations§

source§

impl Default for HuffmanOxide

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> 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, 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.