An EARC archive contains multiple resources (files). It also contains information about each resource’s name and size.
WORD = Int16
DWORD = Int32
EARC File StructureThe beginning of each EARC file contains the header structure below. The table below holds data like the file counts, offsets to files and their names, also to the beginning of the raw file data stored inside.
|FileType||4 Char||File Type === CRAF|
|FileVersion||WORD||File Version info? (Not sure)|
|Unknown||WORD||Always seems to be 512. The minimum a files data seems to be padded with 0's until it is 512 bytes long. This could be a marker for readers to know how to handle the empty data???|
|FileCount||DWORD||The amount of files stored inside of this archive|
|OffsetToFileHeadersList||DWORD||Offset to the list of file headers|
|OffsetToNameList||DWORD||Offset to the list of File Names. They are stored as NULL terminated strings|
|OffsetToNameList2||DWORD||Offset to a second list of File Names. They are stored as NULL terminated strings|
|OffsetToRawData||DWORD||Offset to the Raw Data section of the archive|
|Padding?||24Bytes||Seems to always be 16 bytes of zeros. Might be padding for future expansion of the format.|
EARC - File Headers BlockThe file headers block consists of blocks of data described below. They hold references to a files size, offset, name offset and more. They are packed end to end after the file header.
|SizeCompressed||DWORD||The file size if compressed|
|Size||DWORD||The original file size|
|Flags||DWORD||Possibly a flag marking compression if the value is not 0 or 1 then the file data seems to be compressed with the zLib compression algorithm and SizeCompressed should be used as the compressed data size.|
|NameOffset1||DWORD||Offset in the file to a NULL terminated string|
|DataOffset||DWORD||Offset in the file to the raw data of the file|
|NameOffset2||DWORD||Offset in the file to a NULL terminated string|