SARC (File Format)
SARC Files are uncompressed archive files used in Wii U applications and games, including Mario Kart 8. They are similar to the U8 files found in GameCube and Wii games. Common extensions are .arc, .sarc, .pack, and .bars.
The file begins with a 16 bytes long header, and is followed by a file system and a list of filenames that are included in the archive. All values are big endian.
|0x00||4||Magic: 0x53415243 ("SARC").|
|0x04||2||Unknown. Always 0x0014?|
|0x04||2||Byte order mark (0xFEFF)|
|0x08||4||File size of the entire archive.|
|0x0c||4||Beginning of data offset.|
|0x10||End of SARC header|
Unlike the U8 format, SARC does generally not contain subdirectory nodes (though files may reside inside subfolders). It is currently unknown if it is able to.
|0x00||4||Magic: 0x53464154 ("SFAT").|
|0x04||2||Unknown. Always 0x000C?|
|0x08||4||Unknown. Always 0x00000065?|
|0x0c||End of SFAT header|
|0x04||1||Unknown. Always 0x01? Comparable to the file/folder flag from U8?|
|0x05||3||String table entry offset, relative to the end of the file name table header, divided by 4.|
|0x08||4||Beginning of node file data, relative to the starting offset specified in the SARC header.|
|0x0c||4||End of node file data, relative to the starting offset specified in the SARC header.|
|0x10||End of node|
File Name Table
The header is immediately followed by 4-byte aligned null-terminated strings that represent the filenames of the packed files.
|0x00||4||Magic: 0x53464E54 ("SFNT").|
|0x04||4||Unknown. Always 0x00080000?|
|0x08||End of SFNT header|
The data begins at the variable value specified in the SARC header. There is padding between the files for 256-byte (0x100) alignment.
The following tool can extract SARC files: