pub struct PrefixCodeGroup {
pub green: PrefixCode,
pub red: PrefixCode,
pub blue: PrefixCode,
pub alpha: PrefixCode,
pub distance: PrefixCode,
}Expand description
The five prefix codes that make up one §6.2 “prefix code group”.
In bitstream order: green-channel + backref-length + color-cache (channel 1), red (2), blue (3), alpha (4), backref-distance (5). Each pixel is decoded with exactly one group; which group applies to which pixel block is selected by the §6.2.2 meta-prefix layer.
Fields§
§green: PrefixCodePrefix code #1: green channel + length-prefix + color-cache.
Alphabet size is 256 + 24 + color_cache_size per §6.2.3.
red: PrefixCodePrefix code #2: red channel, alphabet 256.
blue: PrefixCodePrefix code #3: blue channel, alphabet 256.
alpha: PrefixCodePrefix code #4: alpha channel, alphabet 256.
distance: PrefixCodePrefix code #5: backref distance, alphabet 40.
Implementations§
Source§impl PrefixCodeGroup
impl PrefixCodeGroup
Sourcepub fn green_alphabet_size(color_cache_size: usize) -> usize
pub fn green_alphabet_size(color_cache_size: usize) -> usize
The size-of-alphabet for prefix code #1 (green / length /
color-cache) for a stream whose color-cache holds
color_cache_size entries (0 when the cache is disabled,
1 << color_cache_code_bits when it is enabled). Per §6.2.3:
256 + 24 + color_cache_size.
Trait Implementations§
Source§impl Clone for PrefixCodeGroup
impl Clone for PrefixCodeGroup
Source§fn clone(&self) -> PrefixCodeGroup
fn clone(&self) -> PrefixCodeGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrefixCodeGroup
impl Debug for PrefixCodeGroup
impl Eq for PrefixCodeGroup
Source§impl PartialEq for PrefixCodeGroup
impl PartialEq for PrefixCodeGroup
Source§fn eq(&self, other: &PrefixCodeGroup) -> bool
fn eq(&self, other: &PrefixCodeGroup) -> bool
self and other values to be equal, and is used by ==.