Catalog.json: Difference between revisions

Line 96: Line 96:


=== Extra data binary format ===
=== Extra data binary format ===
{{Unfinished}}
 
{{DataStructure|
  {{DataStructureField|extra_data_entries|array|A list of entries. The length of this list should be determined by reading until the end of the binary data. This structure is probably not guaranteed to be an actual list, where each element is right next to another one -- it should be thought of as a heap of arbitrary data, with pointers stored in the <code>extra_data_block_offset</code> field within the <code>EntryData</code> binary. |
    {{DataStructureField||struct|An entry with extra data. The size of the struct is variable.|
      {{DataStructureField|magic_value|uint8|1-byte integer, always 7. The purpose of this value is unknown.}}
      {{DataStructureField|assembly_name_length|uint8|1-byte integer, length of the following string.}}
      {{DataStructureField|assembly_name|string|UTF-8 string, the length is stored in the <code>assembly_name_length</code> field.}}
      {{DataStructureField|class_name_length|uint8|1-byte integer, length of the following string.}}
      {{DataStructureField|class_name|string|UTF-8 string, the length is stored in the <code>class_name_length</code> field.}}
      {{DataStructureField|payload|sized string struct|A little-endian UTF-16 string containing [[JSON]] data. The JSON structure is described below. See [[#Sized string binary format]] and [[#AssetBundleRequestOptions object structure]] for details.}}
    }}
  }}
}}
 
==== AssetBundleRequestOptions object structure ====
 
This is a [[JSON]] document embedded within the extra data entry. It provides more information about downloadable asset bundles, for example, the [[asset bundle name]], [[asset bundle hash]], the size of the bundle and, other information.
 
{{DataStructure|
  {{DataStructureField|m_Hash|string|The [[asset bundle hash]].}}
  {{DataStructureField|m_Crc|number|A CRC checksum of the bundle. {{verify}}}}
  {{DataStructureField|m_Timeout|number|How much time before timing out. The unit is unknown. {{verify}}}}
  {{DataStructureField|m_ChunkedTransfer|bool|Whether to allow chunked transfer. {{verify}}}}
  {{DataStructureField|m_RedirectLimit|number|How many redirects to allow. <code>-1</code> to disable.  {{verify}}}}
  {{DataStructureField|m_RetryCount|number|How many times to retry the request if failed.  {{verify}}}}
  {{DataStructureField|m_BundleName|string|The [[asset bundle name]].}}
  {{DataStructureField|m_AssetLoadMode|number|Unknown; always <code>0</code>. {{verify}}}}
  {{DataStructureField|m_BundleSize|number|The size of the bundle. The unit is unknown. {{verify}}}}
  {{DataStructureField|m_UseCrcForCachedBundles|bool|Unknown; always <code>true</code>. {{verify}}}}
  {{DataStructureField|m_UseUWRForLocalBundles|bool|Unknown; always <code>false</code>. {{verify}}}}
  {{DataStructureField|m_ClearOtherCachedVersionsWhenLoaded|bool|Whether to delete old versions of this bundle when downloading an update.}}
}}


=== Sized string binary format ===
=== Sized string binary format ===