Difference between revisions of "CNMT"

From Nintendo Switch Brew
Jump to navigation Jump to search
m (→‎Metadata file: fix title types link)
m (Fix link)
(18 intermediate revisions by 5 users not shown)
Line 1: Line 1:
For the content of the NCA FS which can be [[Filesystem_services|mounted]], see [[NCA_Content_FS|here]].
+
This is the metadata file that ends in <code>".cnmt{.nca}"</code> or <code>"meta0.ncd"</code>. This seems to replace the TMD format.
  
For the format of the actual NCA, see [[NCA_Format|here]].
+
The official name for CNMT is "PackagedContentMeta".
  
= Metadata file =
+
== Header ==
This is the file that ends in <code>".cnmt{.nca}"</code> or <code>"meta0.ncd"</code>. This seems to replace the TMD format.
 
 
 
There's at least 7 different filenames used for ".cnmt":
 
* "Application_{lower-case hex titleID}.cnmt"
 
* "Patch_{lower-case hex titleID}.cnmt"
 
* "SystemUpdate_{hex titleID}.cnmt"
 
* "SystemData_{lower-case hex titleID}.cnmt"
 
* "SystemProgram_{lower-case hex titleID}.cnmt"
 
* "BootImagePackage_{lower-case hex titleID}.cnmt"
 
* "BootImagePackageSafe_{lower-case hex titleID}.cnmt"
 
 
 
It starts with a header:
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 23: Line 11:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 8
+
| 0x8
| Title ID
+
| Program ID
 
|-
 
|-
 
| 0x8
 
| 0x8
| 4
+
| 0x4
| u32 [[Title_list|title-version]]
+
| Version
 
|-
 
|-
 
| 0xC
 
| 0xC
| 1
+
| 0x1
| Type (see [[NCM_services#Title_Types|Title Types]])
+
| [[NCM_services#ContentMetaType|Content Meta Type]]
 
|-
 
|-
 
| 0xD
 
| 0xD
| 1
+
| 0x1
|
+
| Reserved
 
|-
 
|-
 
| 0xE
 
| 0xE
| 2
+
| 0x2
| Offset to table relative to the end of this 0x20-byte header.
+
| Extended Header Size
 
|-
 
|-
 
| 0x10
 
| 0x10
| 2
+
| 0x2
| Number of content entries
+
| Content Count
 
|-
 
|-
 
| 0x12
 
| 0x12
| 2
+
| 0x2
| Number of meta entries
+
| Content Meta Count
 
|-
 
|-
 
| 0x14
 
| 0x14
| 12
+
| 0x1
|
+
| Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless)
 +
|-
 +
| 0x15
 +
| 0x3
 +
| Reserved
 +
|-
 +
| 0x18
 +
| 0x4
 +
| Required Download System Version
 +
|-
 +
| 0x1C
 +
| 0x4
 +
| Reserved
 
|}
 
|}
  
With SystemUpdate, the 4-bytes at offset 0xE are zero, with the entry-count field located at offset 0x12 instead(header size is the same).
+
== SystemUpdate Extended Header ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Extended Data Size
 +
|}
  
An optional header can follow, depending on the title type.
+
== Application Extended Header ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x8
 +
| Patch ID
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Required System Version
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Required Application Version
 +
|}
  
At the end of the file following the entries is a 0x20-byte block, presumably a hash.
+
== Patch Extended Header ==
 
 
With Patch-format, there's additional data after the end of the entries specified in the header and before the ending hash.
 
 
 
== Application header ==
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 70: Line 94:
 
! Description
 
! Description
 
|-
 
|-
| 0x20
+
| 0x0
| 8
+
| 0x8
| Patch Title ID
+
| Application ID
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Required System Version
 +
|-
 +
| 0xC
 +
| 0x4
 +
| Extended Data Size
 
|-
 
|-
| 0x28
+
| 0x10
| 8
+
| 0x8
| Minimum system version
+
| Reserved
 
|}
 
|}
  
== Patch header ==
+
== AddOnContent Extended Header ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 86: Line 118:
 
! Description
 
! Description
 
|-
 
|-
| 0x20
+
| 0x0
| 8
+
| 0x8
| Original title ID
+
| Application ID
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Required Application Version
 
|-
 
|-
| 0x28
+
| 0xC
| 8
+
| 0x4
| Minimum system version
+
| Reserved
 
|}
 
|}
  
== Add-on content header ==
+
== Delta Extended Header ==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 102: Line 138:
 
! Description
 
! Description
 
|-
 
|-
| 0x20
+
| 0x0
| 8
+
| 0x8
| Application title ID
+
| Application ID
 +
|-
 +
| 0x8
 +
| 0x4
 +
| Extended Data Size
 
|-
 
|-
| 0x28
+
| 0xC
| 8
+
| 0x4
| Minimum application version
+
| Reserved
 
|}
 
|}
  
== Content records ==
+
== Packaged Content Info ==
 
 
Each entry is 0x38 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 122: Line 160:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 32
+
| 0x20
 
| Hash
 
| Hash
 
|-
 
|-
 
| 0x20
 
| 0x20
| 16
+
| 0x10
| NcaId [same as first 16-bytes of hash]
+
| Content ID
 
|-
 
|-
 
| 0x30
 
| 0x30
| 6
+
| 0x6
| Size, same as the output from [[Content_Manager_services#GetEntrySize]].
+
| Size
 
|-
 
|-
 
| 0x36
 
| 0x36
| 1
+
| 0x1
| Type (0=meta, 1=program, 2=data, 3=control, 4=offline-manual [[Internet_Browser|html]], 5=legal [[Internet_Browser|html]], 6=[[NCA_Format|game-update]] RomFS patches?)
+
| Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=[[Internet_Browser|HtmlDocument]], 5=[[Internet_Browser|LegalInformation]], 6=[[NCA_Format|DeltaFragment]])
 
|-
 
|-
 
| 0x37
 
| 0x37
| 1
+
| 0x1
|
+
| ID Offset
 
|}
 
|}
  
== Meta records ==
+
== Content Meta Info ==
 
 
Each entry is 0x10 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 153: Line 189:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 8
+
| 0x8
| Title ID
+
| Program ID
 
|-
 
|-
 
| 0x8
 
| 0x8
| 4
+
| 0x4
| Title version
+
| Version
 
|-
 
|-
 
| 0xC
 
| 0xC
| 1
+
| 0x1
| Type (see [[Content_Manager_services#Title_Types|Title Types]])
+
| [[NCM_services#Title_Types|Content Meta Type]]
 
|-
 
|-
 
| 0xD
 
| 0xD
| 1
+
| 0x1
| ? bit0 set = don't install?
+
| Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless)
 
|-
 
|-
 
| 0xE
 
| 0xE
| 2
+
| 0x2
| Unused?
+
| Reserved
 +
|}
 +
 
 +
This is used for SystemUpdate, see here: [[NCM_services#ReadEntryMetaRecords]].
 +
 
 +
== SystemUpdate Extended Data ==
 +
 
 +
If the Version field is 1, the format is:
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Version
 +
|-
 +
| 0x4
 +
| 0x4
 +
| Variation Count
 +
|-
 +
| 0x8
 +
| 0x20 * Variation Count
 +
| [[CNMT#Firmware_Variation_Info_(Version_1)|Firmware Variation Info (Version 1)]]
 +
|}
 +
 
 +
If the Version field is 2, the format is:
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Version
 +
|-
 +
| 0x4
 +
| 0x4
 +
| Variation Count
 +
|-
 +
| 0x8
 +
| 0x4 * Variation Count
 +
| Firmware Variation ID
 +
|-
 +
|
 +
| 0x20 * Variation Count
 +
| [[CNMT#Firmware_Variation_Info_(Version_2)|Firmware Variation Info (Version 2)]]
 +
|-
 +
|
 +
| 0x10 * Meta Count (From [[CNMT#Firmware_Variation_Info_(Version_2)|Firmware Variation Info (Version 2)]])
 +
| [[CNMT#Content_Meta_Info|Content Meta Info]] (If Refer To Base is True)
 +
|}
 +
 
 +
=== Firmware Variation Info (Version 1) ===
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x4
 +
| Firmware Variation ID
 +
|-
 +
| 0x4
 +
| 0x1C
 +
| Reserved
 
|}
 
|}
  
This is used for SystemUpdate, see here: [[Content_Manager_services#GetUpdateTitleList]].
+
=== Firmware Variation Info (Version 2) ===
  
== Extended data ==
+
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x1
 +
| Refer To Base (0=False, 1=True)
 +
|-
 +
| 0x1
 +
| 0x3
 +
| Reserved
 +
|-
 +
| 0x4
 +
| 0x4
 +
| Meta Count
 +
|-
 +
| 0x8
 +
| 0x18
 +
| Reserved
 +
|}
  
Patch-type cnmt files include an extended data section.
+
== Patch Extended Data ==
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 186: Line 312:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 4
+
| 0x4
| Number of previous cnmt entries.
+
| History Count
 
|-
 
|-
 
| 0x4
 
| 0x4
| 4
+
| 0x4
| Number of previous delta entries.
+
| Delta History Count
 
|-
 
|-
 
| 0x8
 
| 0x8
| 4
+
| 0x4
| Number of delta info entries.
+
| Delta Count
 
|-
 
|-
 
| 0xC
 
| 0xC
| 4
+
| 0x4
| Number of delta application info entries.
+
| Fragment Set Count
 
|-
 
|-
 
| 0x10
 
| 0x10
| 4
+
| 0x4
| Number of previous content entries.
+
| History Content Count
 
|-
 
|-
 
| 0x14
 
| 0x14
| 4
+
| 0x4
| Number of delta content entries.
+
| Delta Content Count
 
|-
 
|-
 
| 0x18
 
| 0x18
| 4
+
| 0x4
| Unused?
+
| Reserved
 
|-
 
|-
 
| 0x1C
 
| 0x1C
| 0x38*X
+
| 0x38 * History Count
| Previous cnmt entries
+
| [[CNMT#History_Header|History Headers]]
 
|-
 
|-
 
|  
 
|  
| 0x28*X
+
| 0x28 * Delta History Count
| Previous delta entries
+
| [[CNMT#Delta_History|Delta Histories]]
 
|-
 
|-
 
|  
 
|  
| 0x28*X
+
| 0x28 * Delta Count
| Delta info entries
+
| [[CNMT#Delta_Header|Delta Headers]]
 
|-
 
|-
 
|  
 
|  
| 0x34*X
+
| 0x34 * Fragment Set Count
| Delta application info entries
+
| [[CNMT#Fragment_Set|Fragment Sets]]
 
|-
 
|-
 
|  
 
|  
| 0x18*X
+
| 0x18 * History Content Count
| Previous content entries
+
| [[CNMT#Packaged_Content_Info|History Content Info]] (Packaged Content Info without the Hash entry)
 
|-
 
|-
 
|  
 
|  
| 0x38*X
+
| 0x38 * Delta Content Count
| Delta content entries. (Standard content records)
+
| [[CNMT#Packaged_Content_Info|Delta Packaged Content Info]]
|-
 
|  
 
| 4
 
| Unknown
 
|-
 
|
 
| 4
 
| Unknown
 
|-
 
|
 
| 4
 
| Unknown
 
 
|-
 
|-
 +
|
 +
| 0x4 * Fragment Indicator Count (From [[CNMT#Fragment_Set|Fragment Sets]])
 +
| [[CNMT#Fragment_Indicator|Fragment Indicators]]
 
|}
 
|}
  
== Previous cnmt records ==
+
=== History Header ===
 
 
Each entry is 0x38 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 262: Line 377:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 8
+
| 0x10
| Title ID
+
| Content Meta Key (Slightly different Content Meta Info)
|-
 
| 0x8
 
| 4
 
| Title version
 
|-
 
| 0xC
 
| 1
 
| Type (see [[Content_Manager_services#Title_Types|Title Types]])
 
|-
 
| 0xD
 
| 3
 
| Unused?
 
 
|-
 
|-
 
| 0x10
 
| 0x10
| 32
+
| 0x20
| Hash
+
| Digest
 
|-
 
|-
 
| 0x30
 
| 0x30
| 2
+
| 0x2
| Unknown
+
| Content Info Count
 
|-
 
|-
 
| 0x32
 
| 0x32
| 2
+
| 0x6
| Unused?
+
| Reserved
|-
 
| 0x34
 
| 4
 
| Unused?
 
|-
 
 
|}
 
|}
  
This contains information on previous metadata files.
+
=== Delta History ===
 
 
== Previous delta records ==
 
 
 
Each entry is 0x28 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 308: Line 402:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 8
+
| 0x8
| Old title ID
+
| Source Patch ID
 
|-
 
|-
 
| 0x8
 
| 0x8
| 8
+
| 0x8
| New title ID
+
| Destination Patch ID
 
|-
 
|-
 
| 0x10
 
| 0x10
| 4
+
| 0x4
| Old title version
+
| Source Version
 
|-
 
|-
 
| 0x14
 
| 0x14
| 4
+
| 0x4
| New title version
+
| Destination Version
 
|-
 
|-
 
| 0x18
 
| 0x18
| 8
+
| 0x8
| Size
+
| Download Size
 
|-
 
|-
 
| 0x20
 
| 0x20
| 8
+
| 0x8
| Unused?
+
| Reserved
|-
 
 
|}
 
|}
  
This contains information on previous delta patches.
+
=== Delta Header ===
 
 
== Delta info records ==
 
 
 
Each entry is 0x28 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 346: Line 435:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 8
+
| 0x8
| Old title ID
+
| Source Patch ID
 
|-
 
|-
 
| 0x8
 
| 0x8
 
| 8
 
| 8
| New title ID
+
| Destination Patch ID
 
|-
 
|-
 
| 0x10
 
| 0x10
| 4
+
| 0x4
| Old title version
+
| Source Version
 
|-
 
|-
 
| 0x14
 
| 0x14
| 4
+
| 0x4
| New title version
+
| Destination Version
 
|-
 
|-
 
| 0x18
 
| 0x18
| 8
+
| 0x2
| Some sort of index?
+
| Fragment Set Count
 +
|-
 +
| 0x1A
 +
| 0x6
 +
| Reserved
 
|-
 
|-
 
| 0x20
 
| 0x20
| 8
+
| 0x2
| Some sort of index?
+
| Content Info Count
 
|-
 
|-
 +
| 0x22
 +
| 0x6
 +
| Reserved
 
|}
 
|}
  
This contains information on the current delta patch.
+
=== Fragment Set ===
 
 
== Delta application info records ==
 
 
 
Each entry is 0x34 bytes:
 
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 384: Line 476:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 16
+
| 0x10
| Old NcaId
+
| Source Content ID
 
|-
 
|-
 
| 0x10
 
| 0x10
| 16
+
| 0x10
| New NcaId
+
| Destination Content ID
 
|-
 
|-
 
| 0x20
 
| 0x20
| 6
+
| 0x6
| Old size
+
| Source Size
 
|-
 
|-
 
| 0x26
 
| 0x26
| 2
+
| 0x6
| Upper 2 bytes of the new size
+
| Destination Size
|-
 
| 0x28
 
| 4
 
| Lower 4 bytes of the new size
 
 
|-
 
|-
 
| 0x2C
 
| 0x2C
| 2
+
| 0x2
| Unknown
+
| Fragment Indicator Count
 
|-
 
|-
 
| 0x2E
 
| 0x2E
| 1
+
| 0x1
| Type (see [[Content_Manager_services#Title_Types|Title Types]])
+
| Fragment Target Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=[[Internet_Browser|HtmlDocument]], 5=[[Internet_Browser|LegalInformation]], 6=[[NCA_Format|DeltaFragment]])
 
|-
 
|-
 
| 0x2F
 
| 0x2F
| 1
+
| 0x1
| ? bit0 set = don't install?
+
| Update Type (0=ApplyAsDelta, 1=Overwrite, 2=Create)
 
|-
 
|-
 
| 0x30
 
| 0x30
| 4
+
| 0x4
| Unused?
+
| Reserved
|-
 
 
|}
 
|}
  
This contains information on how to apply deltas to the previous patch.
+
=== Fragment Indicator ===
  
== Previous content records ==
+
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x2
 +
| Content Info Index
 +
|-
 +
| 0x2
 +
| 0x2
 +
| Fragment Index
 +
|}
  
Each entry is 0x18 bytes:
+
== Delta Extended Data ==
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 434: Line 534:
 
|-
 
|-
 
| 0x0
 
| 0x0
| 16
+
| 0x8
| NcaId
+
| Source Patch ID
 +
|-
 +
| 0x8
 +
| 0x8
 +
| Destination Patch ID
 
|-
 
|-
 
| 0x10
 
| 0x10
| 6
+
| 0x4
| Size
+
| Source Version
 +
|-
 +
| 0x14
 +
| 0x4
 +
| Destination Version
 +
|-
 +
| 0x18
 +
| 0x2
 +
| Fragment Set Count
 
|-
 
|-
| 0x16
+
| 0x1A
| 1
+
| 0x6
| Type (see [[Content_Manager_services#Title_Types|Title Types]])
+
| Reserved
 
|-
 
|-
| 0x17
+
| 0x20
| 1
+
| 0x34 * Fragment Set Count
|  
+
| [[CNMT#Fragment_Set|Fragment Sets]]
 
|-
 
|-
 +
|
 +
| 0x4 * Fragment Indicator Count (From [[CNMT#Fragment_Set|Fragment Sets]])
 +
| [[CNMT#Fragment_Indicator|Fragment Indicators]]
 
|}
 
|}
  
This contains information on previous title content from earlier patches.
+
== Digest ==
 +
 
 +
Always found at the end of the file.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0
 +
| 0x20
 +
| Digest
 +
|}

Revision as of 19:29, 20 April 2020

This is the metadata file that ends in ".cnmt{.nca}" or "meta0.ncd". This seems to replace the TMD format.

The official name for CNMT is "PackagedContentMeta".

Header

Offset Size Description
0x0 0x8 Program ID
0x8 0x4 Version
0xC 0x1 Content Meta Type
0xD 0x1 Reserved
0xE 0x2 Extended Header Size
0x10 0x2 Content Count
0x12 0x2 Content Meta Count
0x14 0x1 Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless)
0x15 0x3 Reserved
0x18 0x4 Required Download System Version
0x1C 0x4 Reserved

SystemUpdate Extended Header

Offset Size Description
0x0 0x4 Extended Data Size

Application Extended Header

Offset Size Description
0x0 0x8 Patch ID
0x8 0x4 Required System Version
0xC 0x4 Required Application Version

Patch Extended Header

Offset Size Description
0x0 0x8 Application ID
0x8 0x4 Required System Version
0xC 0x4 Extended Data Size
0x10 0x8 Reserved

AddOnContent Extended Header

Offset Size Description
0x0 0x8 Application ID
0x8 0x4 Required Application Version
0xC 0x4 Reserved

Delta Extended Header

Offset Size Description
0x0 0x8 Application ID
0x8 0x4 Extended Data Size
0xC 0x4 Reserved

Packaged Content Info

Offset Size Description
0x0 0x20 Hash
0x20 0x10 Content ID
0x30 0x6 Size
0x36 0x1 Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=HtmlDocument, 5=LegalInformation, 6=DeltaFragment)
0x37 0x1 ID Offset

Content Meta Info

Offset Size Description
0x0 0x8 Program ID
0x8 0x4 Version
0xC 0x1 Content Meta Type
0xD 0x1 Content Meta Attributes (0=None, 1=IncludesExFatDriver, 2=Rebootless)
0xE 0x2 Reserved

This is used for SystemUpdate, see here: NCM_services#ReadEntryMetaRecords.

SystemUpdate Extended Data

If the Version field is 1, the format is:

Offset Size Description
0x0 0x4 Version
0x4 0x4 Variation Count
0x8 0x20 * Variation Count Firmware Variation Info (Version 1)

If the Version field is 2, the format is:

Offset Size Description
0x0 0x4 Version
0x4 0x4 Variation Count
0x8 0x4 * Variation Count Firmware Variation ID
0x20 * Variation Count Firmware Variation Info (Version 2)
0x10 * Meta Count (From Firmware Variation Info (Version 2)) Content Meta Info (If Refer To Base is True)

Firmware Variation Info (Version 1)

Offset Size Description
0x0 0x4 Firmware Variation ID
0x4 0x1C Reserved

Firmware Variation Info (Version 2)

Offset Size Description
0x0 0x1 Refer To Base (0=False, 1=True)
0x1 0x3 Reserved
0x4 0x4 Meta Count
0x8 0x18 Reserved

Patch Extended Data

Offset Size Description
0x0 0x4 History Count
0x4 0x4 Delta History Count
0x8 0x4 Delta Count
0xC 0x4 Fragment Set Count
0x10 0x4 History Content Count
0x14 0x4 Delta Content Count
0x18 0x4 Reserved
0x1C 0x38 * History Count History Headers
0x28 * Delta History Count Delta Histories
0x28 * Delta Count Delta Headers
0x34 * Fragment Set Count Fragment Sets
0x18 * History Content Count History Content Info (Packaged Content Info without the Hash entry)
0x38 * Delta Content Count Delta Packaged Content Info
0x4 * Fragment Indicator Count (From Fragment Sets) Fragment Indicators

History Header

Offset Size Description
0x0 0x10 Content Meta Key (Slightly different Content Meta Info)
0x10 0x20 Digest
0x30 0x2 Content Info Count
0x32 0x6 Reserved

Delta History

Offset Size Description
0x0 0x8 Source Patch ID
0x8 0x8 Destination Patch ID
0x10 0x4 Source Version
0x14 0x4 Destination Version
0x18 0x8 Download Size
0x20 0x8 Reserved

Delta Header

Offset Size Description
0x0 0x8 Source Patch ID
0x8 8 Destination Patch ID
0x10 0x4 Source Version
0x14 0x4 Destination Version
0x18 0x2 Fragment Set Count
0x1A 0x6 Reserved
0x20 0x2 Content Info Count
0x22 0x6 Reserved

Fragment Set

Offset Size Description
0x0 0x10 Source Content ID
0x10 0x10 Destination Content ID
0x20 0x6 Source Size
0x26 0x6 Destination Size
0x2C 0x2 Fragment Indicator Count
0x2E 0x1 Fragment Target Content Type (0=Meta, 1=Program, 2=Data, 3=Control, 4=HtmlDocument, 5=LegalInformation, 6=DeltaFragment)
0x2F 0x1 Update Type (0=ApplyAsDelta, 1=Overwrite, 2=Create)
0x30 0x4 Reserved

Fragment Indicator

Offset Size Description
0x0 0x2 Content Info Index
0x2 0x2 Fragment Index

Delta Extended Data

Offset Size Description
0x0 0x8 Source Patch ID
0x8 0x8 Destination Patch ID
0x10 0x4 Source Version
0x14 0x4 Destination Version
0x18 0x2 Fragment Set Count
0x1A 0x6 Reserved
0x20 0x34 * Fragment Set Count Fragment Sets
0x4 * Fragment Indicator Count (From Fragment Sets) Fragment Indicators

Digest

Always found at the end of the file.

Offset Size Description
0x0 0x20 Digest