RAB Format - KCreator/Earth-Defence-Force-Documentation GitHub Wiki

A type of archive containing various data like models and textures.

Header: 40 (0x28) bytes

Offset Size Description
0x00 4 Signature, always 53 53 41 00 ("SSA\0")
0x00 4 Version?, always 10 01 00 00 (0x110)
0x08 4 Offset to beginning of archive's file data
0x0C 4 Largest compressed file size
0x10 4 Largest uncompressed file size
0x14 4 Number of files in archive
0x18 4 Offset to beginning of file info table, always 0x28
0x1C 4 Offset to beginning of file name table
0x20 4 Number of file types used
0x24 4 Offset to beginning of type name table

Note: 0x0C and 0x10 can refer to different files.

File info table, one for each file: 32 (0x20) bytes

Offset Size Description
0x00 4 Relative offset to beginning of file name
0x04 4 Size of file compressed
0x08 4 File type index
0x0C 4 Boolean, equals 1 if file type is "HD-TEXTURE", otherwise 0
0x10 8 Date and time of file (Win32 FILETIME)
0x18 4 Offset to file's data
0x1C 4 Unknown, always 0

Sorted file name table, one for each file: 8 (0x8) bytes

Offset Size Description
0x00 4 Relative offset to beginning of file name
0x04 4 File index

Files here are sorted case sensitively: a file beginning with an uppercase "Z" will be sorted before a lowercase "a".

Type name table, one for each used file type: 4 (0x4) bytes

Offset Size Description
0x00 4 Relative offset to beginning of type name

String table, one for each file and one for each used type: variable length
Each string is a UTF-16 null terminated string.

File data begins here, see CMPL Compression for further information.