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).
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.
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
impl Clone for TiffCompression
Source§fn clone(&self) -> TiffCompression
fn clone(&self) -> TiffCompression
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more