sourcepak/
lib.rs

1//! sourcepak provides support for working with VPK (Valve Pak) files.
2//! It allows you to read the directories of VPK files, as well as read their contents into memory or to disk.
3//!
4//! # Supported formats
5//! | Format      | Support     | Game(s)                                                      |
6//! | ----------- | ----------- | ------------------------------------------------------------ |
7//! | VPK v1      | 🟢   | Alien Swarm, Dota 2, L4D, L4D2, Portal 2, SFM                |
8//! | VPK v2      | 🟡 * | CS:GO, CS:S, DoD:S, HL:S, HL2, HL2:DM, Portal, TF2, Source 2 |
9//! | Respawn VPK | 🟢   | Titanfall                                                    |
10//!
11//! * sourcepak doesn't currently support reading archive contents or writing directory files for VPK v2.
12//!
13//! # Features
14//! - `revpk`: Add support for Respawn VPK files.
15//! - `mem-map`: Use memory mapping to read VPK files. This can be faster and use less memory, but is not supported on all platforms.
16//!
17//! **Note:** Enabling the `revpk` feature requires additional dependencies (`lzham-alpha-sys`).
18//!
19//! **Note:** Enabling the `mem-map` feature requires additional dependencies (`filebuffer`).
20
21#![cfg_attr(docsrs, feature(doc_auto_cfg))]
22
23pub mod common;
24pub mod pak;
25
26#[cfg(test)]
27mod tests;