Unreal Engine 4 PAK: Difference between revisions
imported>Ikskoks |
imported>Ikskoks |
||
| Line 9: | Line 9: | ||
=== Format Specifications === | === Format Specifications === | ||
<div | <div style="border:solid 1px #AAAAAA; padding:4px; background-color:#F9F9F9; font-weight:bold;"> | ||
< | <tt> | ||
// | <font color="blue"><i>Uses ZLib, GZip, or Snappy Compression</i></font><br /> | ||
</ | <font color="blue"><i>FILE DATA</i></font><br /> | ||
<font color="blue"><i>for each file</i></font><br /> | |||
uint64 {8} - null<br /> | |||
uint64 {8} - Compressed Length <font color="purple">(not including the file header fields or padding)</font><br /> | |||
uint64 {8} - Decompressed Length<br /> | |||
uint32 {4} - Compression Type <font color="purple">(0=uncompressed, 1=ZLib, 2=GZip, 4=Snappy)</font><br /> | |||
byte {20} - <font color="red">Unknown</font><br /> | |||
<font color="blue"><i>if (compressed){</i></font><br /> | |||
uint32 {4} - Number of Compressed Blocks<br /> | |||
<font color="blue"><i>for each compressed block</i></font><br /> | |||
uint64 {8} - Offset to the start of the compressed data block <font color="purple">(relative to the start of the archive)</font><br /> | |||
uint64 {8} - Offset to the end of the compressed data block <font color="purple">(relative to the start of the archive)</font><br /> | |||
<br /> | |||
byte {1} - null<br /> | |||
<font color="blue"><i>for each compressed block</i></font><br /> | |||
uint32 {4} - Decompressed Length of thie block<br /> | |||
byte {X} - File Data <font color="purple">(ZLib Compression)</font><br /> | |||
<br /> | |||
byte {0-2047} - null Padding to a multiple of 2048 bytes <font color="purple">(sometimes, not always)</font><br /> | |||
<font color="blue"><i>}</i></font><br /> | |||
<br /> | |||
<font color="blue"><i>else if (uncompressed){</i></font><br /> | |||
uint32 {4} - null<br /> | |||
byte {1} - null<br /> | |||
byte {X} - File Data<br /> | |||
byte {0-2047} - null Padding to a multiple of 2048 bytes <font color="purple">(sometimes, not always)</font><br /> | |||
<font color="blue"><i>}</i></font><br /> | |||
<br /> | |||
<font color="blue"><i>DIRECTORY</i></font><br /> | |||
uint32 {4} - Relative Directory Name Length <font color="purple">(including null terminator)</font> <font color="purple">(10)</font><br /> | |||
byte {9} - Relative Directory Name <font color="purple">(../../../)</font><br /> | |||
byte {1} - null Relative Directory Name Terminator<br /> | |||
uint32 {4} - Number of Files<br /> | |||
<font color="blue"><i>for each file</i></font><br /> | |||
uint32 {4} - Filename Length <font color="purple">(including null terminator)</font><br /> | |||
byte {X} - Filename<br /> | |||
byte {1} - null Filename Terminator<br /> | |||
uint64 {8} - File Offset<br /> | |||
uint64 {8} - Compressed Length <font color="purple">(not including the file header fields or padding)</font><br /> | |||
uint64 {8} - Decompressed Length<br /> | |||
uint32 {4} - Compression Type <font color="purple">(0=uncompressed, 1=ZLib, 2=GZip, 4=Snappy)</font><br /> | |||
byte {20} - <font color="red">Unknown</font><br /> | |||
<font color="blue"><i>if (compressed){</i></font><br /> | |||
uint32 {4} - Number of Compressed Blocks<br /> | |||
<font color="blue"><i>for each compressed block</i></font><br /> | |||
uint64 {8} - Offset to the start of the compressed data block <font color="purple">(relative to the start of the archive)</font><br /> | |||
uint64 {8} - Offset to the end of the compressed data block <font color="purple">(relative to the start of the archive)</font><br /> | |||
<br /> | |||
byte {1} - null<br /> | |||
uint32 {4} - Decompressed Block Size <font color="purple">(65536 if multiple blocks, otherwise the same as the decompressed length)</font><br /> | |||
<font color="blue"><i>}</i></font><br /> | |||
<br /> | |||
<font color="blue"><i>else if (uncompressed){</i></font><br /> | |||
uint32 {4} - null<br /> | |||
byte {1} - null<br /> | |||
<font color="blue"><i>}</i></font><br /> | |||
<br /> | |||
<font color="blue"><i>FOOTER (44 bytes)</i></font><br /> | |||
uint32 {4} - Magic Number <font color="purple">((bytes)225,18,111,90)</font><br /> | |||
uint32 {4} - Version <font color="purple">(3)</font><br /> | |||
uint64 {8} - Directory Offset<br /> | |||
uint64 {8} - Directory Length <font color="purple">(not including FOOTER)</font><br /> | |||
byte {20} - <font color="red">Unknown</font><br /> | |||
<br /> | |||
</tt> | |||
</div> | </div> | ||
Revision as of 13:38, 20 September 2021
Back to index | Edit this page
PAK
- Format Type : Archive
- Endian Order : Little Endian
- Signature : None
Format Specifications
Uses ZLib, GZip, or Snappy Compression
FILE DATA
for each file
uint64 {8} - null
uint64 {8} - Compressed Length (not including the file header fields or padding)
uint64 {8} - Decompressed Length
uint32 {4} - Compression Type (0=uncompressed, 1=ZLib, 2=GZip, 4=Snappy)
byte {20} - Unknown
if (compressed){
uint32 {4} - Number of Compressed Blocks
for each compressed block
uint64 {8} - Offset to the start of the compressed data block (relative to the start of the archive)
uint64 {8} - Offset to the end of the compressed data block (relative to the start of the archive)
byte {1} - null
for each compressed block
uint32 {4} - Decompressed Length of thie block
byte {X} - File Data (ZLib Compression)
byte {0-2047} - null Padding to a multiple of 2048 bytes (sometimes, not always)
}
else if (uncompressed){
uint32 {4} - null
byte {1} - null
byte {X} - File Data
byte {0-2047} - null Padding to a multiple of 2048 bytes (sometimes, not always)
}
DIRECTORY
uint32 {4} - Relative Directory Name Length (including null terminator) (10)
byte {9} - Relative Directory Name (../../../)
byte {1} - null Relative Directory Name Terminator
uint32 {4} - Number of Files
for each file
uint32 {4} - Filename Length (including null terminator)
byte {X} - Filename
byte {1} - null Filename Terminator
uint64 {8} - File Offset
uint64 {8} - Compressed Length (not including the file header fields or padding)
uint64 {8} - Decompressed Length
uint32 {4} - Compression Type (0=uncompressed, 1=ZLib, 2=GZip, 4=Snappy)
byte {20} - Unknown
if (compressed){
uint32 {4} - Number of Compressed Blocks
for each compressed block
uint64 {8} - Offset to the start of the compressed data block (relative to the start of the archive)
uint64 {8} - Offset to the end of the compressed data block (relative to the start of the archive)
byte {1} - null
uint32 {4} - Decompressed Block Size (65536 if multiple blocks, otherwise the same as the decompressed length)
}
else if (uncompressed){
uint32 {4} - null
byte {1} - null
}
FOOTER (44 bytes)
uint32 {4} - Magic Number ((bytes)225,18,111,90)
uint32 {4} - Version (3)
uint64 {8} - Directory Offset
uint64 {8} - Directory Length (not including FOOTER)
byte {20} - Unknown
MultiEx BMS Script
Not written yet.
Notes and Comments
- These files normally occur in path such as "\<game_name>\<build_name>\Content\Paks\<build_name>-WindowsNoEditor.pak"
Games
List of games using this file format:
- Little Nightmares II (PC) (*.PAK)
Compatible Programs
// TODO