1 unstable release
Uses new Rust 2024
| 0.2.0 | Apr 12, 2026 |
|---|
#910 in Compression
Used in 3 crates
(2 directly)
120KB
3K
SLoC
Archive extraction with path sanitization and transactional staging.
Architecture
detect.rs- Format detectionsanitize.rs- Path sanitization (zip-slip prevention)workspace.rs- Transactional extractionextract/- Per-format implementationsdata/- Shared typescodec/- Compression codecsops/- Permission and hash operations
pulith-archive
Archive extraction with sanitization and transactional staging.
Role
pulith-archive owns archive materialization.
It provides:
- archive format handling
- extraction into a target/workspace
- path sanitization
- extraction reporting
It should not own:
- store policy
- install policy
- fetch policy
Main APIs
extract_from_readerArchiveFormatArchiveReportExtractOptionsWorkspaceExtraction
Basic Usage
use pulith_archive::{extract_from_reader, ExtractOptions};
let zip_bytes = std::io::Cursor::new(Vec::<u8>::new());
let _ = extract_from_reader(zip_bytes, "out", &ExtractOptions::default());
How To Use It
Use this crate when a fetched or otherwise available archive needs to become a sanitized file tree that another crate can store or install.
See docs/design/archive.md.
Dependencies
~9–16MB
~323K SLoC