Dissecting the EARC files in Final Fantasy XV

An EARC archive contains multiple resources (files). It also contains information about each resource’s name and size.

WORD = Int16
DWORD = Int32

EARC File Structure

The beginning of each EARC file contains the header structure below. The table below holds data like the file count, offsets to files and their names, also to the begging of the raw file data stored inside.
ValueTypeDescription
FileType4 CharFile Type === CRAF
FileVersionWORDFile Version info? (Not sure)
UnknownWORDAlways 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???
FileCountDWORDThe amount of files stored inside of this archive
Unknown 2DWORD
OffsetToFileHeadersListDWORDOffset to the list of file headers
OffsetToNameListDWORDOffset to the list of File Names. They are stored as NULL terminated strings
OffsetToNameList2DWORDOffset to a second list of File Names. They are stored as NULL terminated strings
OffsetToRawDataDWORDOffset to the Raw Data section of the archive
Unknown 3DWORD
Unknown 4DWORD
Padding?24BytesSeems to always be 16 bytes of zeros. Might be padding for future expansion of the format.

EARC - File Headers Block

The 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.
ValueTypeDescription
Unknown 1DWORD
Unknown 2DWORD
SizeCompressedDWORDThe file size if compressed
SizeDWORDThe original file size
FlagsDWORDPossibly 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.
NameOffset1DWORDOffset in the file to a NULL terminated string
DataOffsetDWORDOffset in the file to the raw data of the file
Unknown 3DWORD
NameOffset2DWORDOffset in the file to a NULL terminated string
Unknown4DWORD

About the Author: Hedgehog Underground