Catalog.json: Difference between revisions

No edit summary
Line 68: Line 68:


=== Bucket data binary format ===
=== Bucket data binary format ===
A '''bucket''' can be thought of as an arbitrary list of entries with a name (<code>key</code>) attached to it. What the list actually means must be determined separately.


<!-- fun fact, this format consists entirely out of uint32 values. fun! -->
<!-- fun fact, this format consists entirely out of uint32 values. fun! -->
Line 74: Line 76:
   {{DataStructureField|buckets|array|A list of buckets. The length of the list can be determined by either using the <code>bucket_count</code> field, or reading until the end of the binary data.|
   {{DataStructureField|buckets|array|A list of buckets. The length of the list can be determined by either using the <code>bucket_count</code> field, or reading until the end of the binary data.|
     {{DataStructureField||struct|A bucket. The size of the struct is variable.|
     {{DataStructureField||struct|A bucket. The size of the struct is variable.|
       {{DataStructureField|key_offset|uint32|4-byte integer, offset into the <code>KeyData</code> binary blob. Points to the beginning of a key entry associated with this bucket.}}
       {{DataStructureField|key_offset|uint32|4-byte integer, offset into the <code>KeyData</code> binary blob. Points to the beginning of a key entry associated with this bucket. The key can be thought of as being owned by this bucket, as no other bucket owns the same key, and the keys in the <code>KeyData</code> blob are not being pointed to by any other part of the system.}}
       {{DataStructureField|entry_count|uint32|4-byte integer, determining the amount of entries in the <code>entries</code> array.}}
       {{DataStructureField|entry_count|uint32|4-byte integer, determining the amount of entries in the <code>entries</code> array.}}
       {{DataStructureField|entries|array|Array of 4-byte indices. The length of this array is determined by the <code>entry_count</code> field.|
       {{DataStructureField|entry_indices|array|Array of 4-byte indices. The length of this array is determined by the <code>entry_count</code> field.|
         {{DataStructureField||uint32|An index. This value is used to index the array that is contained within the binary blob encoded in <code>m_EntryDataString</code>.}}
         {{DataStructureField||uint32|An index. This value is used to index the array that is contained within the binary blob encoded in <code>m_EntryDataString</code>. The index points to an Entry, that is in this bucket.}}
       }}
       }}
     }}
     }}