Rsizetable: Difference between revisions

From EPD Wiki
Jump to navigation Jump to search
Watertoon (talk | contribs)
Improve wording
Watertoon (talk | contribs)
Cleanup
 
Line 1: Line 1:
The resource size table is an ares file format managed by ares::ResourceSizeTable. '''The earliest revision has no header''', only containing the crc32b array, the size of array is implicitly calculated. Succeeded by a version with a 0xc byte header and an optional array of fixed size file path + resource size pairs for file paths that would produce a hash collision (default fixed size of that game's max path). Since succeeded by a version with a new 0x16 byte header, the 0x6 byte magic makes all subsequent u32 values unaligned.
[[Ares]] implements a "resource size table" file format managed by ares::ResourceSizeTable. '''The earliest revision has no header''', only containing the crc32b array, the size of array is implicitly calculated. The first revision adds a 0xc byte header and an optional array of fixed size file path + resource size pairs for file paths that produce a hash collision (default fixed size of that game's max path). The second and most common revision uses a 0x16 byte header, the 0x6 byte magic makes all subsequent u32 values unaligned.
 
== File Structure ==


=== Header (revision 1) ===
=== Header (revision 1) ===
Line 87: Line 89:
|-
|-
|0x0
|0x0
|0x80
|ares MaxPath
|char[ares MaxPath]
|char[ares MaxPath]
|Fixed size file path
|Fixed size file path
|-
|-
|0x80
|ares MaxPath
|0x4
|0x4
|u32
|u32

Latest revision as of 06:29, 16 February 2026

Ares implements a "resource size table" file format managed by ares::ResourceSizeTable. The earliest revision has no header, only containing the crc32b array, the size of array is implicitly calculated. The first revision adds a 0xc byte header and an optional array of fixed size file path + resource size pairs for file paths that produce a hash collision (default fixed size of that game's max path). The second and most common revision uses a 0x16 byte header, the 0x6 byte magic makes all subsequent u32 values unaligned.

File Structure

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 Size of paths in collision table (0x80 and 0xa0 have been used)
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 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 ares MaxPath char[ares MaxPath] Fixed size file path
ares MaxPath 0x4 u32 Size required by file resource in ares