pub enum EncodeMode {
Auto,
Binary,
Grayscale,
Split,
Attached,
}Expand description
Which encoding an encoder should use for a layer.
Variants§
Auto
Smallest of the applicable encodings; ties go to grayscale (section 5.7).
Binary
Binary REE. Requires every pixel to be 0x00 or 0xFF.
Grayscale
Grayscale REE.
Split
Split REE. The thresholded mask thresholds at v >= 128.
Attached
Attached split REE: the same thresholded core and overlay, with the core’s lengths parity-split and self-delta coded and the overlay’s positions implied by the core’s run boundaries.
EncodeMode::Auto never picks this one: its raw size is not a guide to
its compressed size, so a caller that wants it - or the writer’s own probe
- asks for it and compares the compressed result.
Trait Implementations§
Source§impl Clone for EncodeMode
impl Clone for EncodeMode
Source§fn clone(&self) -> EncodeMode
fn clone(&self) -> EncodeMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EncodeMode
Source§impl Debug for EncodeMode
impl Debug for EncodeMode
Source§impl Default for EncodeMode
impl Default for EncodeMode
Source§fn default() -> EncodeMode
fn default() -> EncodeMode
Returns the “default value” for a type. Read more
impl Eq for EncodeMode
Source§impl PartialEq for EncodeMode
impl PartialEq for EncodeMode
impl StructuralPartialEq for EncodeMode
Auto Trait Implementations§
impl Freeze for EncodeMode
impl RefUnwindSafe for EncodeMode
impl Send for EncodeMode
impl Sync for EncodeMode
impl Unpin for EncodeMode
impl UnsafeUnpin for EncodeMode
impl UnwindSafe for EncodeMode
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