Skip to main content

Module chunk

Module chunk 

Source
Expand description

Wire-format chunk types and the ZiPatchReader iterator. Wire-format chunk types and the ZiPatchReader iterator.

This module is the parsing layer: it decodes the raw ZiPatch byte stream into a stream of typed Chunk values. Each top-level variant corresponds to one 4-byte ASCII wire tag (FHDR, APLY, SQPK, …); the per-variant submodules below own the binary layout for their body. Nothing in this module touches the filesystem — apply-time effects live in crate::apply.

The ZiPatchReader iterator validates the 12-byte file magic on construction, then yields one Chunk per Iterator::next call until the internal EOF_ terminator is consumed or a parse error surfaces.

Structs§

AddDirectory
ADIR chunk: create a directory under the game install root.
ApplyFreeSpace
APFS chunk: free-space book-keeping; ignored at apply time.
ApplyOption
APLY chunk: sets or clears a boolean flag on the crate::ApplyContext.
DeleteDirectory
DELD chunk: remove a directory under the game install root.
FileHeaderV2
FHDR v2 body: minimal patch metadata from older patch files.
FileHeaderV3
FHDR v3 body: full patch metadata for modern FFXIV patch files.
SqpackFile
Identifier of a SqPack file targeted by a SQPK command.
SqpkAddData
SQPK A command body: write an inline data payload into a .dat file, then zero a trailing region.
SqpkCompressedBlock
One block of a SqpkFile AddFile payload, which may be DEFLATE-compressed or stored raw.
SqpkDeleteData
SQPK D command body: overwrite a contiguous block range in a .dat file with empty-block markers, logically freeing that space.
SqpkExpandData
SQPK E command body: grow a .dat file by writing empty-block markers into a previously unallocated region.
SqpkFile
SQPK F command body: a file-level operation on the game install tree.
SqpkHeader
SQPK H command body: write a 1024-byte SqPack header into a target file.
SqpkIndex
SQPK I command body: add or remove a single SqPack index entry.
SqpkPatchInfo
SQPK X command body: patch install metadata.
SqpkTargetInfo
SQPK T command body: declares the target platform, region, and patch statistics for all subsequent operations in a patch file.
ZiPatchReader
Iterator over the Chunks in a ZiPatch stream.

Enums§

ApplyOptionKind
Which apply-time flag an APLY chunk toggles.
Chunk
One top-level chunk parsed from a ZiPatch stream.
FileHeader
FHDR chunk: patch file header with a version-specific body.
IndexCommand
Sub-command byte of a SQPK I (Index) chunk.
SqpkCommand
Sub-command of a SQPK chunk; the variant is selected by the command byte.
SqpkFileOperation
Operation byte of a SQPK F command; selects what the command does to the game install tree.
SqpkHeaderTarget
Resolved file target for a SqpkHeader, tagged by TargetFileKind.
TargetFileKind
Which SqPack file kind a SqpkHeader targets.
TargetHeaderKind
Which header slot a SqpkHeader writes into.