Purpose
PAK files are the primary container format for Dragon Nest, containing almost all of the asset files for the game.
Examples
Resource00.pak through Resource13.pak in the Dragon Nest installation directory.
General Format Overview
The PAK file structure consists of a header, containing the number of subfiles and the location of the index table; subfile data blocks, containing the compressed subfile data; and the index. The index may be located anywhere in the file after the header, but is usually the last section in the file.
PAK Format
Header
Name | Data Type | Value | Description |
---|---|---|---|
Magic Number |
FBSTR[256]
|
EyedentityGames Packing File 0.1
|
PAK file magic number/identifier string. |
Unknown A |
INT32
|
0x0000000B
|
Unknown. Always 11 (0x0B). |
File Count |
UINT32
|
Varies | Number of files in this PAK. |
File Index Table Offset |
UINT32
|
Varies | A pointer to the location of the file index table |
Padding |
UINT8[756]
|
Varies | Padding bytes to make the PAK header 1024 bytes in total |
File Index Table
Name | Data Type | Value | Description |
---|---|---|---|
File Index Entries |
FileIndexEntry[Header.FileCount]
|
Varies | An array of Header.FileCount File Index Entries describing the files in this PAK. |
File Index Table Entry
Name | Data Type | Value | Description |
---|---|---|---|
File Path |
FBSTR[256]
|
Varies | The (virtual) path of this file. |
Raw Size |
UINT32
|
Varies | The size of this file, in bytes, as it is on the disk in the PAK. |
Real Size |
UINT32
|
Varies | The size of this file, in bytes, when decompressed. This value may be zero, which simply means that you will not be able to pre-allocate a buffer when decompressing. |
Compressed Size |
UINT32
|
Varies | The size of this file, in bytes, when compressed in the PAK. Should be the same as Raw Size. |
File Data Offset |
UINT32
|
Varies | A pointer to the location of this file's data. |
Unknown A |
UINT32
|
Varies | Unknown. Seems to have no effect. |
Unknown B |
40 bytes
|
NUL x 40 | Unknown. Seems to be just padding for future expansion. Filled with NUL bytes. |
File Data
File data is compressed using DEFLATE.