| Crates.io | enfusion_pak |
| lib.rs | enfusion_pak |
| version | 0.2.0 |
| created_at | 2025-09-26 21:18:27.587048+00 |
| updated_at | 2025-09-28 01:24:29.524127+00 |
| description | A library/cli for reading Enfusion game engine `.pak` files. |
| homepage | https://landaire.github.io/enfusion_tools |
| repository | https://github.com/landaire/enfusion_tools |
| max_upload_size | |
| id | 1856655 |
| size | 110,450 |
A library for reading Enfusion game engine .pak files.
For the CLI tool:
$ cargo install --locked enfusion_pak
$ enfusion_pak --help
A library/cli for reading Enfusion game engine `.pak` files.
Usage: enfusion_pak [OPTIONS] <FILE>
Arguments:
<FILE> Path to either a single file or a directory containing `.pak` files
Options:
-l, --long Print long file information
-m, --merged Virtually merge contents of files together so that duplicate directories across multiple `.pak` files are treated as a single filesystem entry
-h, --help Print help
-V, --version Print version
For the library:
cargo add enfusion_pak
There is currently one example of how to use this library, provided in examples/dump_file. After cloning the repo you can run it from the root repo directory with:
cargo run --release --example dump_file -- ARMA_DATA_FILES_DIR /scripts/Game/Campaign/
This currently supports PAK files versioned at 0x10003. Currently older versions are not supported (although they wouldn't be difficult to add if needed).
vfs crate.The PAK format is somewhat similar to other container file formats like MP4, but does have inter-chunk references.
The main parsing logic can be found in src/parser.rs.
The following diagram describes the general format:
Chunk format:
┌─────────────────────┬────────────────────┬──────────────────────────────┐
│ 4 byte identifier │ 4 byte data len │ Identifier-specific data... │
└─────────────────────┴────────────────────┴──────────────────────────────┘
┌───────────────────────┐
│ Header Chunk │
├───────────────────────│
│ │
│ Additional Chunks │
│ │
│ │
├───────────────────────│
│ │
│ Data Chunk │
│ │
│ │
│ │
│ Casual 1.8GiB │
┌─▶│ of data │◀─┐
│ │ │ │┌───────────┐
│ │ │ ││ File Meta │
│ │ │ ││has offset │
│ ├───────────────────────┤ ││ into data │
│ │ File Chunk │ ││ chunk │
│ │ │ ││ │
│ ├───────────┬───────────┤ │└───────────┘
│ │ File Meta │ File Meta │──┘
│ ├───────────┼───────────┤
└──│ File Meta │ File Meta │
├───────────┼───────────┤
│ File Meta │ File Meta │
└───────────┴───────────┘