pub struct SqpkTargetInfo {
pub platform_id: u16,
pub region: i16,
pub is_debug: bool,
pub version: u16,
pub deleted_data_size: u64,
pub seek_count: u64,
}Expand description
SQPK T command body: declares the target platform, region, and patch
statistics for all subsequent operations in a patch file.
A real FFXIV patch file begins with a T command before any write
operations, so the platform declared here is in effect for all subsequent
path resolution. The apply layer updates crate::apply::ApplyContext::platform
from platform_id and otherwise ignores the
remaining fields.
§Wire format
Important: Most fields are big-endian (the struct-level #[br(big)]
default), but deleted_data_size and
seek_count are little-endian. This
endian anomaly is present in the original C# implementation
(SqpkTargetInfo.cs) and must be preserved exactly.
┌───────────────────────────────────────────────────────────────────┐
│ <reserved> : [u8; 3] (always zero) │ bytes 0–2
│ platform_id : u16 BE 0=Win32, 1=PS3, 2=PS4 │ bytes 3–4
│ region : i16 BE -1=Global │ bytes 5–6
│ is_debug : i16 BE 0=release, nonzero=debug │ bytes 7–8
│ version : u16 BE client version │ bytes 9–10
│ deleted_data_size : u64 LE ← little-endian anomaly │ bytes 11–18
│ seek_count : u64 LE ← little-endian anomaly │ bytes 19–26
│ <trailing padding> bounded by the body slice │
└───────────────────────────────────────────────────────────────────┘§Reference
See SqpkTargetInfo.cs in the XIVLauncher reference implementation.
§Errors
Parsing returns crate::ZiPatchError::BinrwError if the body is too
short to contain all required fields.
Fields§
§platform_id: u16Target platform identifier.
| Value | Platform | Path suffix |
|---|---|---|
0 | Windows / PC | win32 |
1 | PlayStation 3 | ps3 |
2 | PlayStation 4 | ps4 |
| other | Unknown | falls back to win32 |
Preceded by 3 bytes of reserved/padding in the wire format. Encoded as
a big-endian u16.
region: i16Region code for the patch target.
-1 means Global (the standard international release). Other values
are region-specific builds (e.g. Chinese or Korean clients). Encoded as
a big-endian i16.
is_debug: booltrue when the patch targets a debug build of the game client.
Parsed from a big-endian i16: zero → false, any nonzero → true.
Debug patches are not distributed through normal update channels.
version: u16Target client version number. Informational; not used for path resolution.
Encoded as a big-endian u16.
deleted_data_size: u64Total bytes freed (deleted) across the entire patch.
Used by patch manager UIs for progress estimation. Little-endian
despite the struct-level #[br(big)] default — see the wire-format
note above.
seek_count: u64Total number of seek operations the patcher is expected to perform.
Used by patch manager UIs for progress estimation. Little-endian
despite the struct-level #[br(big)] default — see the wire-format
note above.
Trait Implementations§
Source§impl BinRead for SqpkTargetInfo
impl BinRead for SqpkTargetInfo
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for SqpkTargetInfo
impl Clone for SqpkTargetInfo
Source§fn clone(&self) -> SqpkTargetInfo
fn clone(&self) -> SqpkTargetInfo
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 SqpkTargetInfo
impl Debug for SqpkTargetInfo
Source§impl PartialEq for SqpkTargetInfo
impl PartialEq for SqpkTargetInfo
Source§fn eq(&self, other: &SqpkTargetInfo) -> bool
fn eq(&self, other: &SqpkTargetInfo) -> bool
self and other values to be equal, and is used by ==.Source§impl ReadEndian for SqpkTargetInfo
impl ReadEndian for SqpkTargetInfo
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
impl Eq for SqpkTargetInfo
impl StructuralPartialEq for SqpkTargetInfo
Auto Trait Implementations§
impl Freeze for SqpkTargetInfo
impl RefUnwindSafe for SqpkTargetInfo
impl Send for SqpkTargetInfo
impl Sync for SqpkTargetInfo
impl Unpin for SqpkTargetInfo
impl UnsafeUnpin for SqpkTargetInfo
impl UnwindSafe for SqpkTargetInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more