| Crates.io | rpak |
| lib.rs | rpak |
| version | 0.2.0 |
| created_at | 2020-08-16 02:14:25.336338+00 |
| updated_at | 2021-08-29 02:58:21.027874+00 |
| description | Simple no_std-compatible helper for the Quake 2 PAK format |
| homepage | https://github.com/u1f408/rpak |
| repository | https://github.com/u1f408/rpak |
| max_upload_size | |
| id | 277099 |
| size | 13,231 |
Simple no_std-compatible helper for the Quake 2 PAK format.
Add to your Cargo.toml:
rpak = "0.2"
The "std" feature is enabled by default, for no_std environments (only where
alloc is available), use:
rpak = { version = "0.2", default-features = false }
To load an archive:
use rpak::PakArchive;
let mut data: Vec<u8> = Vec::new();
let _ = File::open("data.pak")?.read_to_end(&mut data)?;
let archive = PakArchive::from_bytes(&data[..])?;
assert!(archive.files.len() > 0);
MIT