<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://ffxivclassic.fragmenterworks.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deviltti</id>
		<title>FFXIV Classic Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://ffxivclassic.fragmenterworks.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deviltti"/>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php/Special:Contributions/Deviltti"/>
		<updated>2026-04-21T21:00:04Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=846</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=846"/>
				<updated>2019-06-07T02:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks always appear immediately after the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed. While unknown, it is assumed that APFS blocks may deal with the filesystem architecture in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Static analysis of ffxivupdater.exe indicates the following filesystem architectures as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;NTFS&amp;quot;&lt;br /&gt;
&amp;quot;FAT&amp;quot;&lt;br /&gt;
&amp;quot;FAT12&amp;quot;&lt;br /&gt;
&amp;quot;FAT16&amp;quot;&lt;br /&gt;
&amp;quot;FAT32&amp;quot;&lt;br /&gt;
&amp;quot;CDFS&amp;quot;&lt;br /&gt;
&amp;quot;UDF&amp;quot;&lt;br /&gt;
&amp;quot;EXFAT&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are also involved with APFS blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the directory for the specified path, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=845</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=845"/>
				<updated>2019-06-07T02:43:40Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks always appear immediately after the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed. While unknown, it is assumed that APFS blocks may deal with the filesystem architecture in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Static analysis of ffxivupdater.exe indicates the following filesystem types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;NTFS&amp;quot;&lt;br /&gt;
&amp;quot;FAT&amp;quot;&lt;br /&gt;
&amp;quot;FAT12&amp;quot;&lt;br /&gt;
&amp;quot;FAT16&amp;quot;&lt;br /&gt;
&amp;quot;FAT32&amp;quot;&lt;br /&gt;
&amp;quot;CDFS&amp;quot;&lt;br /&gt;
&amp;quot;UDF&amp;quot;&lt;br /&gt;
&amp;quot;EXFAT&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are also involved with APFS blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the directory for the specified path, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=844</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=844"/>
				<updated>2019-06-07T02:37:00Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* DELD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks always appear immediately after the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed. While unknown, it is assumed that APFS blocks may deal with the filesystem architecture in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the directory for the specified path, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=843</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=843"/>
				<updated>2019-06-07T02:34:05Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks always appear immediately after the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed. While unknown, it is assumed that APFS blocks may deal with the filesystem architecture in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=842</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=842"/>
				<updated>2019-06-07T02:28:47Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APLY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks always appear immediately after the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=841</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=841"/>
				<updated>2019-06-07T02:27:48Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* Block Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice, data[0..3], is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=840</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=840"/>
				<updated>2019-06-07T02:27:07Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* FHDR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks provide an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made to the filesystem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=839</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=839"/>
				<updated>2019-06-07T02:25:45Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of their executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and improperly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Block Structure ==&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:60%&amp;quot;&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=831</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=831"/>
				<updated>2019-06-07T01:12:51Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. Static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=830</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=830"/>
				<updated>2019-06-07T01:11:49Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t has no compression ''N'' or is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=829</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=829"/>
				<updated>2019-06-07T01:09:45Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm ''Z''.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=828</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=828"/>
				<updated>2019-06-07T01:09:09Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added ''A'', deleted ''D'', or modified ''M''. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib ''Z'' algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=827</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=827"/>
				<updated>2019-06-07T01:08:26Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A'; [44 00 00 00] 'D'; [4D 00 00 00] 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' and [5A 00 00 00] 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added 'A', deleted 'D', or modified 'M'. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib 'Z' algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=826</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=826"/>
				<updated>2019-06-07T01:06:48Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APLY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A' (add); [44 00 00 00] 'D' (delete); [4D 00 00 00] 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' (none); [5A 00 00 00] 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=825</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=825"/>
				<updated>2019-06-07T01:03:07Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* File Header */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, read until EOF, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01]; [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A' (add); [44 00 00 00] 'D' (delete); [4D 00 00 00] 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' (none); [5A 00 00 00] 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=824</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=824"/>
				<updated>2019-06-07T01:01:46Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APLY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01]; [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A' (add); [44 00 00 00] 'D' (delete); [4D 00 00 00] 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' (none); [5A 00 00 00] 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=823</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=823"/>
				<updated>2019-06-07T01:01:33Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // [41 00 00 00] 'A' (add); [44 00 00 00] 'D' (delete); [4D 00 00 00] 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // [4E 00 00 00] 'N' (none); [5A 00 00 00] 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=822</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=822"/>
				<updated>2019-06-07T01:00:09Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APLY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1; // [00 00 00 01] and [00 00 00 02] observed&lt;br /&gt;
    int unknown2; // [00 00 00 04] observed&lt;br /&gt;
    int unknown3; // [00 00 00 01] observed&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=821</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=821"/>
				<updated>2019-06-07T00:51:52Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1;&lt;br /&gt;
    int unknown2;&lt;br /&gt;
    int unknown3;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following are observed values for APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[00 00 00 01 00 00 00 04 00 00 00 01]&lt;br /&gt;
[00 00 00 02 00 00 00 04 00 00 00 01]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
    char data[];         // size&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=820</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=820"/>
				<updated>2019-06-07T00:50:55Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1;&lt;br /&gt;
    int unknown2;&lt;br /&gt;
    int unknown3;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following are observed values for APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[00 00 00 01 00 00 00 04 00 00 00 01]&lt;br /&gt;
[00 00 00 02 00 00 00 04 00 00 00 01]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=819</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=819"/>
				<updated>2019-06-07T00:46:48Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APLY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
&lt;br /&gt;
APLY blocks have not been reversed. Two APLY blocks appear to immediately follow the FHDR block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct aply_t&lt;br /&gt;
{&lt;br /&gt;
    int unknown1;&lt;br /&gt;
    int unknown2;&lt;br /&gt;
    int unknown3;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following are observed values for APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[00 00 00 01 00 00 00 04 00 00 00 01]&lt;br /&gt;
[00 00 00 02 00 00 00 04 00 00 00 01]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=818</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=818"/>
				<updated>2019-06-07T00:43:22Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings are involved with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;Total incremental file size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental disk size: %lld&amp;quot;&lt;br /&gt;
&amp;quot;Total incremental max disk size: %lld&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=817</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=817"/>
				<updated>2019-06-07T00:42:44Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is unknown whether the following referenced text strings deal with APFS blocks or APLY blocks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'    Total incremental file size: %lld'&lt;br /&gt;
'    Total incremental disk size: %lld'&lt;br /&gt;
'    Total incremental max disk size: %lld'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=816</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=816"/>
				<updated>2019-06-07T00:39:08Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* Block Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;FHDR&amp;quot;&lt;br /&gt;
&amp;quot;APLY&amp;quot;&lt;br /&gt;
&amp;quot;APFS&amp;quot;&lt;br /&gt;
&amp;quot;ETRY&amp;quot;&lt;br /&gt;
&amp;quot;ADIR&amp;quot;&lt;br /&gt;
&amp;quot;DELD&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=815</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=815"/>
				<updated>2019-06-07T00:38:43Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* FHDR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // &amp;quot;DIFF&amp;quot; or &amp;quot;HIST&amp;quot; observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=814</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=814"/>
				<updated>2019-06-07T00:38:22Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A' (add); 0x44 - 'D' (delete); 0x4D - 'M' (modify) observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N' (none); 0x5A - 'Z' (zlib) observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=813</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=813"/>
				<updated>2019-06-07T00:20:58Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by performing explicit operations on the specified file path, relative to the installation directory. The operation is dependent on the chunk_t mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A'; 0x44 - 'D'; 0x4D - 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N'; 0x5A - 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk_t mode indicates whether the specific entry file chunk_t will be added, deleted, or modified, relative to the installation directory. In order to validate the operation, SHA-1 hashes are used to verify file deltas. The chunk_t compressionMode indicates whether the specific entry file chunk_t is compressed with the zlib algorithm.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=812</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=812"/>
				<updated>2019-06-07T00:15:57Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem, dependent on the chunk mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int mode;            // 0x41 - 'A'; 0x44 - 'D'; 0x4D - 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N'; 0x5A - 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chunk mode indicates whether an entry file will be added, deleted, or modified in the installation directory. SHA-1 hashes are used to determine whether the operation was successful.&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=811</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=811"/>
				<updated>2019-06-07T00:11:35Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ETRY */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
&lt;br /&gt;
ETRY blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct etry_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize;     // LE&lt;br /&gt;
    char path[];      // pathSize&lt;br /&gt;
    int count;        // LE&lt;br /&gt;
    chunk_t chunks[]; // count&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct chunk_t&lt;br /&gt;
{&lt;br /&gt;
    int type;            // 0x41 - 'A'; 0x44 - 'D'; 0x4D - 'M' observed&lt;br /&gt;
    char prevHash[20];   // SHA-1&lt;br /&gt;
    char nextHash[20];   // SHA-1&lt;br /&gt;
    int compressionMode; // 0x4E - 'N'; 0x5A - 'Z' observed&lt;br /&gt;
    int size;            // LE&lt;br /&gt;
    int prevSize;        // LE&lt;br /&gt;
    int nextSize;        // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=810</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=810"/>
				<updated>2019-06-07T00:01:51Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* Block Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;          // LE&lt;br /&gt;
    char data[];       // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=809</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=809"/>
				<updated>2019-06-07T00:01:35Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* Block Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;         // LE&lt;br /&gt;
    char data[];      // size + 4&lt;br /&gt;
    unsigned long crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=808</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=808"/>
				<updated>2019-06-06T23:54:48Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ADIR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;         // LE&lt;br /&gt;
    char data[];      // size + 4&lt;br /&gt;
    unsigned int crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=807</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=807"/>
				<updated>2019-06-06T23:54:33Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* DELD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;         // LE&lt;br /&gt;
    char data[];      // size + 4&lt;br /&gt;
    unsigned int crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char path[];  // pathSize&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=806</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=806"/>
				<updated>2019-06-06T23:52:54Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* Block Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct block_t&lt;br /&gt;
{&lt;br /&gt;
    int size;         // LE&lt;br /&gt;
    char data[];      // size + 4&lt;br /&gt;
    unsigned int crc; // CRC32 (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=805</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=805"/>
				<updated>2019-06-06T23:48:15Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* DELD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;br /&gt;
&lt;br /&gt;
DELD blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by deleting the specified directory, relative to the installation directory, if it exists.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct deld_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=804</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=804"/>
				<updated>2019-06-06T23:46:39Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* FHDR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=803</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=803"/>
				<updated>2019-06-06T23:46:30Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ADIR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=802</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=802"/>
				<updated>2019-06-06T23:46:18Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=801</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=801"/>
				<updated>2019-06-06T23:46:10Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct apfs_t&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=800</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=800"/>
				<updated>2019-06-06T23:45:37Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=799</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=799"/>
				<updated>2019-06-06T23:45:19Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks are have not been observed directly in ZiPatch files. It is assumed that this may deal with the filesystem in some way.&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=798</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=798"/>
				<updated>2019-06-06T23:44:17Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* APFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
&lt;br /&gt;
APFS blocks are have not been observed directly in ZiPatch files and currently their purpose is unknown.&lt;br /&gt;
&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=797</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=797"/>
				<updated>2019-06-06T23:43:20Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ADIR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct adir_t&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=796</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=796"/>
				<updated>2019-06-06T23:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* FHDR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct fhdr_t&lt;br /&gt;
{&lt;br /&gt;
    char version[4];  // [00 00 02 00] observed; Static analysis of ffxivupdater.exe indicates FileHeaderV2&lt;br /&gt;
    char result[4];   // DIFF or HIST observed&lt;br /&gt;
    int numEntryFile; // LE&lt;br /&gt;
    int numAddDir;    // LE&lt;br /&gt;
    int numDeleteDir; // LE&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=795</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=795"/>
				<updated>2019-06-06T23:38:32Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* ADIR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
    int pathSize; // LE&lt;br /&gt;
    char* path;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=794</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=794"/>
				<updated>2019-06-06T23:34:55Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* File Header */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which provide ffxivupdater.exe with information to carry out specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=793</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=793"/>
				<updated>2019-06-06T23:34:07Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins for his open-source server emulator for FINAL FANTASY XIV, SeventhUmbral [http://seventhumbral.org/]. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which carry specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=792</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=792"/>
				<updated>2019-06-06T23:31:10Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] in 2013 by Jean-Philip Desjardins his SeventhUmbral [http://seventhumbral.org/] FINAL FANTASY XIV 1.23b server emulator. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which carry specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=791</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=791"/>
				<updated>2019-06-06T23:29:52Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] by Jean-Philip Desjardins for the SeventhUmbral [http://seventhumbral.org/] FINAL FANTASY XIV 1.23b server emulator in 2013. This implementation allowed the ZiPatch files that were backed up by Krizz [http://tehkrizz.net/] and others in the community to be applied to a new installation and incorrectly update the client to 1.23b.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which carry specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	<entry>
		<id>http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=790</id>
		<title>ZiPatch File Structure</title>
		<link rel="alternate" type="text/html" href="http://ffxivclassic.fragmenterworks.com/wiki/index.php?title=ZiPatch_File_Structure&amp;diff=790"/>
				<updated>2019-06-06T23:25:50Z</updated>
		
		<summary type="html">&lt;p&gt;Deviltti: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== History ===&lt;br /&gt;
&lt;br /&gt;
ZiPatch (.patch) files are a compressed file format for FINAL FANTASY XIV. This file format was later modified in 2012 for DRAGON QUEST X and FINAL FANTASY XIV: A Realm Reborn, which are more similar in their DAT structure to each other than to FINAL FANTASY XIV. As such, many of the block types that are found in this version have been deprecated. However, static analysis of the A Realm Reborn executables indicate that they may still be able to read this version.&lt;br /&gt;
&lt;br /&gt;
Initial, minimal research of the ZiPatch file format was made publically available [https://github.com/jpd002/SeventhUmbral/blob/master/launcher/PatchFile.cpp] by Jean-Philip Desjardins for the SeventhUmbral [http://seventhumbral.org/] FINAL FANTASY XIV 1.23b server emulator in November 2013.&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
ZiPatch files have a unique file header (12 bytes), which is used to identify the file format. The ZiPatch File Header is immediately followed by ''n'' blocks, each of which carry specific instructions.&lt;br /&gt;
&amp;lt;pre&amp;gt;91 5A 49 50 41 54 43 48 0D 0A 1A 0A            ‘ZIPATCH....&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Block Structure ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4)]&lt;br /&gt;
struct Block&lt;br /&gt;
{&lt;br /&gt;
    int _dataSize; // Little Endian&lt;br /&gt;
    byte[] _data;  // data.Length is dataSize + 4 (inclusive of block type identifier)&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _crc;   // crc is a standard CRC32 checksum (RFC 1952) of data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The slice of data[0..3] is a string used to identify the block type. Static analysis of ffxivupdater.exe indicates the following block types as valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FHDR&lt;br /&gt;
APLY&lt;br /&gt;
APFS&lt;br /&gt;
ETRY&lt;br /&gt;
ADIR&lt;br /&gt;
DELD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== FHDR ===&lt;br /&gt;
&lt;br /&gt;
FHDR blocks are an abstract of the changes that should occur as a result of applying the ZiPatch in terms of the type and count of the changes to be made.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential, Pack=4, Size=20)]&lt;br /&gt;
struct FileHeader&lt;br /&gt;
{&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _version;         // version format is unknown, but may be major/minor. Analysis of ffxivupdater.exe indicates the string FileHeaderV2. [00 00 02 00] observed&lt;br /&gt;
&lt;br /&gt;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst=4)]&lt;br /&gt;
    byte[] _result;          // DIFF or HIST observed&lt;br /&gt;
&lt;br /&gt;
    int _numEntryFile;       // Little Endian&lt;br /&gt;
    int _numAddDirectory;    // Little Endian&lt;br /&gt;
    int _numDeleteDirectory; // Little Endian&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== APLY ===&lt;br /&gt;
=== APFS ===&lt;br /&gt;
=== ETRY ===&lt;br /&gt;
=== ADIR ===&lt;br /&gt;
&lt;br /&gt;
ADIR blocks provide the information for ffxivupdater.exe to make changes directly to the filesystem by creating a new directory for the specified path, relative to the installation directory, if it does not already exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;
struct ADIR&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DELD ===&lt;/div&gt;</summary>
		<author><name>Deviltti</name></author>	</entry>

	</feed>