pub enum Variant {
Classic,
Big,
}Expand description
Which variant of the TIFF container a stream uses, distinguished by the header magic number.
The two variants share an identical tag/IFD model; they differ only in the width of the
structural fields — BigTIFF widens every file offset (and the IFD entry count and per-field
value count) from 32 to 64 bits so a file may exceed 4 GiB (references/tiff/bigtiff.html).
The Variant::Big arm — and every 64-bit width it selects — exists only when the bigtiff
feature is enabled.
Variants§
Classic
Classic TIFF 6.0: magic 42, an 8-byte header, 12-byte IFD entries, 32-bit offsets.
Big
BigTIFF: magic 43, a 16-byte header, 20-byte IFD entries, 64-bit offsets.
Implementations§
Source§impl Variant
impl Variant
Sourcepub fn header_size(self) -> usize
pub fn header_size(self) -> usize
The size of the image file header in bytes (8 classic, 16 BigTIFF).
Sourcepub fn entry_size(self) -> usize
pub fn entry_size(self) -> usize
The on-disk size of one IFD entry in bytes (12 classic, 20 BigTIFF).
Sourcepub fn count_size(self) -> usize
pub fn count_size(self) -> usize
The size of an IFD’s leading entry-count field in bytes (2 classic, 8 BigTIFF).
Sourcepub fn offset_size(self) -> usize
pub fn offset_size(self) -> usize
The size of a file offset (first-IFD pointer, next-IFD pointer, value offset) in bytes (4 classic, 8 BigTIFF).
Sourcepub fn inline_threshold(self) -> usize
pub fn inline_threshold(self) -> usize
The largest value, in bytes, that is stored inline in an IFD entry rather than out of line
(4 classic, 8 BigTIFF — equal to Self::offset_size).