TOC (FileFormat)
From SWGANH Wiki
TOC - Table Of Contents (Game File)
Understood at |
|
Primary Structure
Block | Size | Order | ||||||||||||||||||
Header |
|
none | ||||||||||||||||||
TRE filenames |
|
by name | ||||||||||||||||||
Item index |
|
by CRC | ||||||||||||||||||
Item filenames |
|
by CRC |
Breakdown
A_STRING | TOC file type header id " COT1000" (sequence: 0x20 0x43 0x4F 0x54, 0x31, 0x30, 0x30, 0x30) |
UINT | Compression (?) - as of yet always 0 |
UINT | Items count |
UINT | Items index size (should always be items count * 24; seemingly ordered by CRC) |
UINT | Filenames size |
UINT | Unknown (could be original filenames size, if compressed, as of yet always = filenames size) |
UINT | TRE filenames count |
UINT | TRE Filenames Size |
<TRE Filenames count=TRE filenames count>
A_STRING list of 0-terminated TRE filename strings, seemingly ordered by name
<TRE Filenames/>
<Item Index count=Items count>
USHORT Compression flag (2 if compressed, otherwise 0) USHORT TRE index (in TRE filenames list) UINT CRC (of the filename) UINT Filename length UINT Offset in TRE file UINT Original item size UINT (Compressed) Item size, thus 0 if not compressed
<Item Index/>
<TRE Filenames count=TRE filenames count>
A_STRING list of 0-terminated item filename strings, in the same order as the index items (by CRC)
<TRE Filenames/>