Contents

The PAK format appears to be encoded in little-endian format. A PAK archive consists of one or more archive files: a primary file, e.g. Main.pak, and perhaps a number of secondary files, e.g. Main_1.pak.

Following the header is the file table as a sequence of file records. Each file record is 0x110 (272) bytes long.

Offset

Type

Size (bytes)

Field

0x000

char*

256

Relative file path.

0x100

uint32

4

Offset of the file within the archive file in bytes, not including the archive header if the file is in the primary archive file. This should be a multiple of 0x8000 (32 KiB).

0x104

uint32

4

File size in bytes.

0x108

uint32

4

Compressed file size. If the value is zero, the file is not compressed. If the value is nonzero, the file is zlib-compressed.

0x10C

uint32

4

Index of the archive file the file is located in. 0 is the primary archive file.

The remaining length between the end of the manifest and the start of the data section is padded with 0xAD bytes.
(This is how the official packer does it, however the padding bytes don't actually matter, they can be anything.)

In the primary archive file, the data section follows the header. In the secondary archive files, the data section is the entire archive file. Files are laid out in the data section according to their record in the file table. Any space between the end of a file and the start of the next file is padded with 0xAD bytes. The end of the data section is also padded with 0xAD bytes to fill a block of 0x8000 bytes (32 KiB).

Gamepedia

Tools

Content is available under CC BY-NC-SA 3.0 unless otherwise noted.Game content and materials are trademarks and copyrights of their respective publisher and its licensors. All rights reserved.
This site is a part of Curse, Inc. and is not affiliated with the game publisher.