#[non_exhaustive]pub enum FileHeader {
V2(FileHeaderV2),
V3(FileHeaderV3),
}Expand description
FHDR chunk: patch file header with a version-specific body.
This is always the first chunk in a well-formed ZiPatch file, immediately
following the 12-byte file magic. The version byte selects whether a v2 or
v3 body follows.
§Wire format
[version_word: i32 LE] -- version = bits 16..23 of this word
[body: version-specific] -- FileHeaderV2 or FileHeaderV3 (big-endian)
[trailing: 0x08 or 0xB8 bytes of zeros/unknowns, ignored]The version word is the only little-endian field in the chunk. The rest of the header is big-endian, matching the rest of the format.
§Errors
Parsing fails with crate::ZiPatchError::BinrwError if the body is too
short to contain the full version-specific fields.
See lib/FFXIVQuickLauncher/.../Chunk/FileHeaderChunk.cs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
V2(FileHeaderV2)
Version 2 header — older patches with minimal metadata.
V3(FileHeaderV3)
Version 3 header — modern patches with full statistical summary.
Implementations§
Source§impl FileHeader
impl FileHeader
Sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
Returns the format version number: 2 for FileHeader::V2, 3 for
FileHeader::V3.
Sourcepub fn patch_type(&self) -> &[u8; 4]
pub fn patch_type(&self) -> &[u8; 4]
Returns the 4-byte ASCII patch type tag (e.g. b"D000" or b"H000").
Delegates to the inner FileHeaderV2::patch_type or
FileHeaderV3::patch_type field without copying.
Trait Implementations§
Source§impl Clone for FileHeader
impl Clone for FileHeader
Source§fn clone(&self) -> FileHeader
fn clone(&self) -> FileHeader
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 FileHeader
impl Debug for FileHeader
Source§impl PartialEq for FileHeader
impl PartialEq for FileHeader
Source§fn eq(&self, other: &FileHeader) -> bool
fn eq(&self, other: &FileHeader) -> bool
self and other values to be equal, and is used by ==.