From cc3625cb4b291f948b5c50419e3a4ee00ab717d4 Mon Sep 17 00:00:00 2001 From: Albert Hui Date: Mon, 27 Jul 2026 01:40:56 +0800 Subject: [PATCH] docs(dar-archive): add missing crate README release-plz's release job failed to publish dar-archive: `readme README.md does not appear to exist (relative to crates/dar-archive)`. crates/dar-archive/Cargo.toml declares `readme = "README.md"` but the file was absent, so `cargo publish` aborted. Add a real README (tagline, features, usage) describing the DAR archive reader, written from its public API (DarArchive::open/open_slices, entries(), read()). Co-Authored-By: Claude Opus 4.8 --- crates/dar-archive/README.md | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 crates/dar-archive/README.md diff --git a/crates/dar-archive/README.md b/crates/dar-archive/README.md new file mode 100644 index 0000000..df39b73 --- /dev/null +++ b/crates/dar-archive/README.md @@ -0,0 +1,45 @@ +# dar-archive + +Pure-Rust reader for **DAR** (Disk ARchive) archives, part of the +[chat4n6](https://github.com/SecurityRonin/chat4n6) forensic toolkit. + +Reads DAR catalogs and extracts file contents with no external `libdar` +dependency — the archive is memory-mapped and file bytes are returned +zero-copy (`Cow::Borrowed`) straight from the mapping. + +## Features + +- Single-file (`.dar`) and multi-slice (`name.1.dar`, `name.2.dar`, …) archives. +- Catalog parsing into `DarEntry` records (path, size, directory flag, Unix + permissions, slice index, data offset). +- Bounds-checked reads — an entry whose data would fall outside its slice is + rejected rather than read out of range. + +## Usage + +```rust +use dar_archive::DarArchive; +use std::path::Path; + +// Single-file archive. +let archive = DarArchive::open(Path::new("evidence.1.dar"))?; + +// Or a multi-slice set, given the basename (no slice number, no extension): +// let archive = DarArchive::open_slices(Path::new("evidence"))?; + +for entry in archive.entries() { + if entry.is_dir { + continue; + } + let bytes = archive.read(entry)?; + println!("{} ({} bytes)", entry.path.display(), bytes.len()); +} +# Ok::<(), anyhow::Error>(()) +``` + +For a multi-slice set the catalog lives only in the last (terminal) slice; +earlier slices hold file data. + +## License + +MIT