| Crates.io | casc-storage |
| lib.rs | casc-storage |
| version | 0.4.3 |
| created_at | 2025-08-11 12:11:05.988905+00 |
| updated_at | 2025-08-11 12:11:05.988905+00 |
| description | CASC (Content Addressable Storage Container) implementation for local game file storage |
| homepage | |
| repository | https://github.com/wowemulation-dev/cascette-rs |
| max_upload_size | |
| id | 1790068 |
| size | 349,079 |
CASC (Content Addressable Storage Container) implementation for local storage of NGDP content.
Add this to your Cargo.toml:
[dependencies]
casc-storage = "0.1"
This crate provides local storage functionality for NGDP content using the CASC format, which is Blizzard's content-addressable storage system. It handles:
.idx and data archive files.idx files with proper bucket organizationuse casc_storage::CascStorage;
use std::path::Path;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Open existing CASC storage
let storage = CascStorage::open(Path::new("/path/to/data"))?;
// Look up content by key
let key = "abc123def456..."; // 32-char hex string
if let Some(data) = storage.read(key).await? {
println!("Found content: {} bytes", data.len());
}
Ok(())
}
use casc_storage::CascStorageBuilder;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create new CASC storage
let mut builder = CascStorageBuilder::new("/path/to/data")?;
// Add content
let content = b"Hello, CASC!";
let key = builder.add_content(content)?;
println!("Stored with key: {}", key);
// Build the storage (creates archives and indices)
builder.build().await?;
Ok(())
}
The CASC storage system consists of:
Data Archives (data.000, data.001, etc.)
Index Files (.idx files)
Loose Files (data/XX/XXXXXXXX...)
⚠️ Beta: This crate is under active development. The API may change before 1.0 release.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.