pub struct HTreeGroup {
pub htrees: [HuffmanTablesOffset; 5],
pub is_trivial_literal: bool,
pub literal_arb: u32,
pub is_trivial_code: bool,
pub use_packed_table: bool,
pub packed_table: [HuffmanCode32; 64],
}Expand description
Huffman table group.
Includes special handling for the following cases:
is_trivial_literal: one common literal base for RED/BLUE/ALPHA (not GREEN)is_trivial_code: only 1 code (no bit is read from bitstream)use_packed_table: few enough literal symbols, so all the bit codes can fit into a small look-up tablepacked_table[]
The common literal base, if applicable, is stored in literal_arb.
Fields§
§htrees: [HuffmanTablesOffset; 5]The first entry of each tree, in the tables of the owner.
is_trivial_literal: boolTrue, if huffman trees for Red, Blue & Alpha Symbols are trivial (have a single code).
literal_arb: u32If is_trivial_literal is true, this is the ARGB value of the pixel,
with Green channel being set to zero.
is_trivial_code: boolTrue if is_trivial_literal with only one code.
use_packed_table: boolUse packed table below for short literal code.
packed_table: [HuffmanCode32; 64]Table mapping input bits to a packed values, or escape case to literal code.
Implementations§
Trait Implementations§
Source§impl Clone for HTreeGroup
impl Clone for HTreeGroup
Source§impl Debug for HTreeGroup
impl Debug for HTreeGroup
Source§impl Default for HTreeGroup
impl Default for HTreeGroup
impl Eq for HTreeGroup
Source§impl PartialEq for HTreeGroup
impl PartialEq for HTreeGroup
impl StructuralPartialEq for HTreeGroup
Auto Trait Implementations§
impl Forget for HTreeGroup
impl Freeze for HTreeGroup
impl Move for HTreeGroup
impl RefUnwindSafe for HTreeGroup
impl Send for HTreeGroup
impl Sync for HTreeGroup
impl Unpin for HTreeGroup
impl UnsafeUnpin for HTreeGroup
impl UnwindSafe for HTreeGroup
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