# libchm
Pure-Rust reader for CHM (Compiled HTML Help) archives.
## Installation
```sh
cargo add libchm
```
## Usage
```rust
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