4 releases
| 0.1.8 | Oct 8, 2025 |
|---|---|
| 0.1.7 | Oct 8, 2025 |
| 0.1.5 | Jul 21, 2025 |
#517 in Compression
70KB
1.5K
SLoC
casc-rs
A pure Rust implementation of a Casc Storage Handler, inspired by the version ported to C# from C++. This crate allows you to read and extract files from Blizzard's CASC storage format.
Note: This library currently only supports CASC storages that use the TVFS root file format.
Usage
Add to your Cargo.toml
[dependencies]
casc-rs = 0.1
Example: Listing and Extracting Files
use casc_rs::casc_storage::CascStorage;
use std::fs::File;
use std::io::Write;
fn main() {
// Open a CASC storage directory (containing .build.info, Data/)
let storage = CascStorage::open("path/to/casc/storage").unwrap();
// List all files
for file_info in &storage.files {
println!("File: {} ({} bytes)", file_info.file_name(), file_info.file_size());
}
// Extract a file by name
let file_name = "some/file/in/storage.txt";
let mut casc_reader = storage.open_file(file_name).unwrap();
let mut output = File::create("output.txt").unwrap();
std::io::copy(&mut casc_reader, &mut output).unwrap();
}
Dependencies
~1MB
~16K SLoC