Skip to main content

Module blob

Module blob 

Source
Expand description

Typetree node lists, written in the blob format (format 10 and 12 up) or the old recursive format (below 10, and 11).

The layouts are the ones UnityPy 1.25.2 reads: the blob is TypeTreeNode.parse_blob (helpers/TypeTreeNode.py:111-154, rows hBBIIiii plus Q from format 19, :331-347) and the old format is TypeTreeNode.parse (:78-109: each node’s fields, then its child count, children following in pre-order). Rows are written in the file’s byte order.

Owner: package C.

Structs§

NodeSpec
One node, as the writer lays it out.

Enums§

Strings
How strings are stored in a blob.

Functions§

blob_tree
A blob-format tree: node count, string-buffer size, nodes, buffer. common is (offset, string) pairs used when strings is Common: a type or name equal to one of them is written as its offset with the high bit set, and every other string goes into the local buffer. Each distinct local string is stored once, in first-use order (type, then name, row by row).
no_nul_blob
A little-endian blob of format 19 and up whose rows rows each name offset 0 of a string buffer of buffer bytes A with no NUL for both their type and their name (round 4’s input): every string is the 32,767-byte window where the buffer is longer, and raises where it is not. Each row is a level-0 node of byte size -1 and index i.
old_tree
An old-format tree: each node then its child count, recursively (in pre-order). The format decides the fields, as TypeTreeNode.parse reads them: m_VariableCount (written 0) only at format 2, m_Index and m_MetaFlag except at format 3. A node’s children are the rows UnityPy’s stack rule nests directly under it (TypeTreeNode.from_list), so a level jump nests under the previous row as the blob reader would nest it.