1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Pure Rust library for reading Blizzard CASC (Content Addressable Storage Container) archives.
//!
//! CASC is the file storage format used by World of Warcraft (and other Blizzard titles) to
//! bundle game data on disk. This crate provides the building blocks to open a local CASC
//! installation, resolve file identifiers, and extract raw file content.
//!
//! # Architecture
//!
//! The extraction pipeline follows this path:
//!
//! 1. **Config** - parse `.build.info`, build config, and CDN config to discover keys and paths.
//! 2. **Storage** - open `data.NNN` archives and their `.idx` index files.
//! 3. **Encoding** - load the encoding file that maps content keys (CKeys) to encoding keys (EKeys).
//! 4. **Root** - load the root file that maps file data IDs (FDIDs) to CKeys.
//! 5. **BLTE** - decode the BLTE container (decompress, decrypt) to get raw file bytes.
//!
//! # Quick Start
//!
//! ```no_run
//! use casc_lib::extract::pipeline::{CascStorage, OpenConfig};
//! use casc_lib::root::flags::LocaleFlags;
//!
//! let config = OpenConfig {
//! install_dir: "E:\\World of Warcraft".into(),
//! product: None,
//! keyfile: None,
//! listfile: None,
//! output_dir: None,
//! };
//! let storage = CascStorage::open(&config)?;
//! let data = storage.read_by_fdid(136235, LocaleFlags::EN_US)?;
//! # Ok::<(), casc_lib::error::CascError>(())
//! ```
/// BLTE (Binary Large Table Entry) container decoding, compression, and encryption.
/// CASC configuration file parsers (`.build.info`, build config, CDN config).
/// Encoding file parser - maps content keys (CKeys) to encoding keys (EKeys).
/// Error types and the crate-wide [`Result`](error::Result) alias.
/// High-level extraction pipeline for opening CASC storage and reading files.
/// Community listfile download and parsing (FDID to filename mapping).
/// Root file parser - maps file data IDs (FDIDs) to content keys (CKeys).
/// Low-level data archive and index file access.
/// Shared I/O and hashing utilities.