Rsizetable

Revision as of 08:24, 9 May 2023 by Watertoon (talk | contribs) (Created page with "The resource size table is an ares file format managed by ares::ResourceSizeTable. It contains an array of sorted file path Crc32b hashes + file resource heap size pairs, '''the earliest revision has no header'''. Since succeeded by a version with a 0xc byte header and an optional additional array of fixed 128 byte file paths + file resource heap size pairs for file paths that would produce a hash collision. Since succeeded by version with a new 0x16 byte header, the 0x6...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The resource size table is an ares file format managed by ares::ResourceSizeTable. It contains an array of sorted file path Crc32b hashes + file resource heap size pairs, the earliest revision has no header. Since succeeded by a version with a 0xc byte header and an optional additional array of fixed 128 byte file paths + file resource heap size pairs for file paths that would produce a hash collision. Since succeeded by version with a new 0x16 byte header, the 0x6 byte magic makes all subsequent u32 values unaligned.

Header (revision 1)

Offset Size Type Description
0x0 0x4 u32 Magic ("RSTB" in big-endian)
0x4 0x4 u32 Crc32b resource size pair count
0x8 0x4 u32 Path resource size pair count

Header (revision 2)

Offset Size Type Description
0x0 0x6 u32 Magic ("RESTBL" in big-endian)
0x6 0x4 u32 Version?
0xa 0x4 u32 Reserved
0xe 0x4 u32 Crc32b resource size pair count
0x12 0x4 u32 Path resource size pair count

Crc32b Array

Array of hash + size pairs immediately following the header, if the header exists. Sorted by hash.

Offset Size Type Description
0x0 0x4 u32 Crc32b of 128-byte file path
0x4 0x4 u32 Size required by file resource in ares

Path Array

Array of path + size pairs immediately following the Crc32b array, if the file path array exists. Sorted by path.

Offset Size Type Description
0x0 0x80 const char[0x80] 128-byte file path
0x80 0x4 u32 Size required by file resource in ares