TOC (FileFormat)

From SWGANH Wiki
Jump to: navigation, search

TOC - Table Of Contents (Game File)

Understood at
75%

Primary Structure

Block Size Order
Header
A_STRING Header ID
UINT Compression
UINT Items count
UINT Items index size
UINT Filenames size
UINT Unknown
UINT TRE filenames count
UINT TRE filenames size
= 28 Bytes
none
TRE filenames
A_STRING <TRE filenames size>
by name
Item index
USHORT Compression
USHORT TRE index
UINT CRC
UINT Filename length
UINT Offset
UINT Original item size
UINT (Compressed) Item size
24 Bytes * <Item count>
by CRC
Item filenames
A_STRING <Item filenames size>
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/>