Skip to main content

TiffCompression

Enum TiffCompression 

Source
pub enum TiffCompression {
    None,
    PackBits,
    Lzw,
    Deflate,
    Zstd,
    CcittRle,
    CcittT4OneD {
        eol_byte_aligned: bool,
    },
    CcittT4TwoD {
        eol_byte_aligned: bool,
    },
    CcittT6,
}
Expand description

Compression scheme for an EncodePage.

Variants§

§

None

§

PackBits

§

Lzw

§

Deflate

§

Zstd

Compression=50000 — Zstandard (RFC 8478), the de-facto registry extension documented in the OxideAV trace doc docs/image/tiff/tiff-zstd-compression-50000.md. Follows the Compression=8 Deflate template exactly: each strip / tile becomes one self-contained Zstandard frame over the post-predictor sample bytes, so it composes with every byte-aligned pixel format, Predictor = 2, planar writing, tiling, and BigTIFF just like TiffCompression::Deflate. The encoder compression level is an out-of-band runtime parameter (never stored in the file); the writer uses the compression backend’s default.

§

CcittRle

Compression=2 — CCITT Modified Huffman (TIFF 6.0 §10). Bilevel only. Encoded as a sequence of white/black run-length codes from Tables 1/T.4 and 2/T.4. No EOL codes; rows align to byte boundaries.

§

CcittT4OneD

Compression=3 — CCITT T.4 1-D (TIFF 6.0 §11). Bilevel only. Each row is preceded by a 12-bit EOL prefix. With eol_byte_aligned, the EOL is byte-aligned (T4Options bit 2).

Fields

§eol_byte_aligned: bool
§

CcittT4TwoD

Compression=3 — CCITT T.4 2-D / Modified READ (TIFF 6.0 §11 with T4Options bit 0 set). Bilevel only. Row 0 is coded 1-D (tag bit 1) and seeds the reference line for row 1; rows 1.. are coded 2-D (tag bit 0) against the previously coded row using the Pass / Horizontal / Vertical mode codes from Table 4/T.4 (docs §1). eol_byte_aligned mirrors T4Options bit 2 just as in TiffCompression::CcittT4OneD.

Fields

§eol_byte_aligned: bool
§

CcittT6

Compression=4 — CCITT T.6 / Modified Modified READ (MMR) (TIFF 6.0 §11). Bilevel only. Every row is 2-D against the previously coded row; the first row’s reference is an imaginary all-white line per T.6 §2.2.1. No EOL framing between rows. The decoder stops at rows rows so no EOFB sentinel is written.

Trait Implementations§

Source§

impl Clone for TiffCompression

Source§

fn clone(&self) -> TiffCompression

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TiffCompression

Source§

impl Debug for TiffCompression

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.