PAK (File Format)

From Wexos's Wiki
Revision as of 17:57, 1 May 2024 by Wexos (talk | contribs) (Imported from avsys wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

PAK is a container file format used in games developed by Vicarious Visions, such as Marvel Ultimate Alliance 2, Crash Bandicoot N. Sane Trilogy and Crash Team Racing Nitro-Fueled.

File Format

The file byte order is always little endian.

Header

Offset Type Description
0x00 Char[4] File magic. Always IGA\u001A.
0x04 UInt32 File version.
0x08 UInt32 Unknown.
0x0C UInt32 Number of file entries.
0x10 UInt32 Size of compressed data chunks in bytes.
0x14 UInt32 Unknown.
0x18 UInt32 Unknown.
0x1C UInt32 Unknown.
0x20 UInt32 Size of table 1 in bytes.
0x24 UInt32 Size of table 2 in bytes.
0x28 UInt32 String table offset. Points to an array of UInt32s, which points to null-terminated strings.
0x2C UInt32 Unknown.
0x30 UInt32 Unknown.
0x34 UInt32 Unknown.

Hash List

After the header comes a hash list of the files. Presumably these are hashes of the filename, since the file entries are sorted by this hash. Each entry is a 32-bit value.

File Entry

The hash list follows by an array of file entries. Each entry has the following structure:

Offset Type Description
0x00 UInt32 File data offset.
0x04 UInt32 Ordinal.
0x08 UInt32 File data size.
0x0C UInt32 Flag. 0xFFFFFFFF means it's not compressed. xxAx xxxx xxxx xxxx xxxx xxxx xxxx xxxx.
  • A: Compression method. Deflate = 0, LZMA = 1

Tools

The following tools can handle PAK files:

  • (none)