libchm 0.2.0

Pure-Rust CHM file reader.
Documentation

libchm

Pure-Rust reader for CHM (Compiled HTML Help) archives.

Installation

cargo add libchm

Usage

use libchm::{ChmFile, EntrySel};

fn main() -> libchm::Result<()> {
    let mut chm = ChmFile::open("docs.chm")?;
    for entry in chm.entries(EntrySel::ALL)? {
        println!("{}", entry.path);
    }
    let entry = chm.find("/index.html")?;
    let bytes = chm.read(&entry)?;
    println!("index size: {}", bytes.len());
    Ok(())
}

EntrySel is a bitflag that filters by category (NORMAL, SPECIAL, META) and kind (FILES, DIRS). Use EntrySel::ALL to get everything or combine flags as needed.

License

MIT