tact_parser/
lib.rs

1//! # TACT Parser
2//!
3//! Parser for various TACT (Torrent-Assisted Content Transfer) file formats
4//! used by Blizzard Entertainment's NGDP (Next Generation Distribution Pipeline).
5//!
6//! This crate provides parsers for the file formats used to distribute game data
7//! through Blizzard's CDN. While some community tooling refers to these as "CASC files",
8//! CASC specifically refers to the virtual filesystem used by locally-installed games.
9//!
10//! ## Features
11//!
12//! - **WoW Root Parsing**: Read World of Warcraft root files to find file IDs and MD5 hashes
13//! - **Jenkins3 Hashing**: Implementation of the Jenkins3 hash algorithm used by TACT
14//! - **Efficient I/O**: Buffered I/O operations for parsing large game data files
15//! - **Format Support**: Both modern (8.2+) and legacy pre-8.2 root file formats
16//!
17//! ## Quick Start
18//!
19//! Parse a WoW root file to find game data files:
20//!
21//! ```no_run
22//! use tact_parser::wow_root::{WowRootHeader, LocaleFlags, ContentFlags};
23//! use std::fs::File;
24//! use std::io::BufReader;
25//!
26//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
27//! // Parse root file header
28//! let mut file = BufReader::new(File::open("path/to/root")?);
29//! let header = WowRootHeader::parse(&mut file)?;
30//!
31//! println!("Root file version: {}", header.version);
32//! println!("Total files: {}", header.total_file_count);
33//! # Ok(())
34//! # }
35//! ```
36//!
37//! ## Roadmap
38//!
39//! Current implementation status:
40//!
41//! - ✅ WoW Root file parsing
42//! - ✅ Jenkins3 hash implementation
43//! - ✅ Encoding file parsing (CKey ↔ EKey mapping)
44//! - ✅ Install manifest parsing (with tag-based filtering)
45//! - ✅ Build/CDN config parsing
46//! - ✅ 40-bit integer support
47//! - ✅ Variable-length integer support
48//! - ⏳ Download manifest parsing (planned)
49//! - ⏳ Size file parsing (planned)
50//! - ⏳ TVFS support (planned)
51//! - ⏳ BLTE file decoding (planned - separate crate)
52//!
53//! ## See Also
54//!
55//! - [`ngdp-client`](https://docs.rs/ngdp-client) - CLI tool for NGDP operations
56//! - [`tact-client`](https://docs.rs/tact-client) - TACT protocol client
57//! - [TACT Format Documentation](https://wowdev.wiki/TACT)
58
59pub mod config;
60pub mod download;
61pub mod encoding;
62mod error;
63pub mod install;
64mod ioutils;
65pub mod jenkins3;
66pub mod size;
67pub mod tvfs;
68pub mod utils;
69pub mod wow_root;
70
71pub use error::Error;
72pub type Result<T> = std::result::Result<T, Error>;