archmeld
Secure, memory-safe, type-safe CLI for multi-format archive extraction, inspection and decompression.
Features
- 24 archive and compression formats supported
- Zero
unsafecode (unsafe_code = "forbid") - Security-first extraction via
safe_unzip(zip-slip, zip-bomb, symlink, encrypted entry protection) - 4 output formats: text, JSON, SARIF 2.1.0, Markdown
- 359 tests, 15 fuzz targets, 0 cargo-audit vulnerabilities
- 2.3 MiB binary (51% smaller than ouch)
- CSAF 2.0 advisories for all security findings
Installation
Or download pre-built binaries from the releases page.
Quick Start
# Detect format
# List contents
# Extract
# Validate (dry-run, no output written)
# Verify integrity (checksums)
# Compress with Zopfli (high-ratio gzip)
# LZ4 compress/decompress
# Inspect headers
# Output as JSON, SARIF, or Markdown
Supported Formats
| Format | Extract | List | Info | Inspect |
|---|---|---|---|---|
| ZIP | YES | YES | YES | |
| TAR | YES | YES | YES | |
| TAR.GZ | YES | YES | YES | |
| TAR.BZ2 | YES | YES | YES | |
| TAR.XZ | YES | YES | YES | |
| TAR.ZSTD | YES | YES | YES | |
| TAR.LZ4 | YES | YES | ||
| 7-Zip | YES | YES | ||
| GZIP | YES | YES | YES | |
| BZIP2 | YES | YES | ||
| XZ | YES | YES | ||
| LZ4 | YES | YES | YES | |
| Zstandard | YES | YES | ||
| BZip3 | YES | YES | ||
| Brotli | YES | YES | ||
| Snappy | YES | YES | ||
| LZMA | YES | YES | ||
| DEB | YES | YES | YES | |
| AR | YES | YES | YES | |
| CAB | YES | YES | YES | |
| RAR | YES | YES | YES | |
| StuffIt | YES | YES | ||
| Compact Pro | YES | YES | ||
| Lzip | YES | |||
| ARC | YES |
RAR support requires the rar feature (enabled
by default, bundles C++ unrar library).
Security
archmeld is built with security as a primary goal:
unsafe_code = "forbid"in the entire crate- Zip-Slip protection via
path_jailandsanitize_path - Zip-Bomb detection with configurable limits (file size, total size, entry count, compression ratio, path depth)
- Symlink rejection (configurable policy)
- Encrypted entry detection (returns error)
- Filename sanitization (control characters, Windows reserved names)
- Two-pass validation (
ValidateFirstmode) - Permission stripping (setuid/setgid removal)
- Atomic file creation (
O_EXCLviasafe_unzip)
# Configurable safety limits
Benchmark vs ouch
Tested on macOS (Apple Silicon) with hyperfine.
Large File Extraction (curl 8.20.0 source)
| File | archmeld | ouch | Winner |
|---|---|---|---|
| curl.tar.gz | 2467 ms | 5574 ms | archmeld 2x |
| curl.tar.bz2 | 9302 ms | 14773 ms | archmeld 2x |
| curl.tar.xz | 4970 ms | 5954 ms | archmeld 1x |
| curl.zip | 5186 ms | 4020 ms | ouch 1x |
Code Quality (rust-doctor)
| Category | archmeld | ouch |
|---|---|---|
| Overall | 99 / 100 | 92 / 100 |
| Security | 100 | 99 |
| Reliability | 100 | 90 |
| Maintainability | 98 | 69 |
| Warnings | 24 | 345 |
Summary
| Metric | archmeld | ouch |
|---|---|---|
| Formats | 24 | 14 |
| Binary size | 2.3 MiB | 4.7 MiB |
| Tests | 359 | N/A |
| Fuzz targets | 15 | N/A |
unsafe_code |
Forbidden | Used |
| Security features | 14 | 2 |
| cargo-audit | 0 vulns | N/A |
| CSAF advisories | 4 | 0 |
Full benchmark details in benchmark.md.
Library Usage
use Extractor;
use ;
// Detect format from bytes
let data = read?;
let fmt = detect_format;
// Extract with safety limits
let extractor = new
.with_max_file_size
.with_max_total_size
.with_max_entries;
let files = extractor.extract?;
for file in &files
// Validate without extracting
let result = extractor.validate?;
println!;
Building
# Debug build
# Release build
# Without RAR support (no C++ dependency)
# Run tests
# Run clippy
# Run fuzz targets (requires nightly)
CSAF Security Advisories
All dependency vulnerabilities are documented
as CSAF 2.0 advisories in csaf/:
- ndaal-sa-2026-007: lz4_flex info leak (RUSTSEC-2026-0041) — FIXED
- ndaal-sa-2026-008: tar PAX header (RUSTSEC-2026-0068) — FIXED
- ndaal-sa-2026-009: tar symlink chmod (RUSTSEC-2026-0067) — FIXED
- ndaal-sa-2026-010: time DoS (RUSTSEC-2026-0009) — FIXED
License
MIT OR Apache-2.0
Authors
ndaal GmbH — Pierre Gronau
Security contact: security@ndaal.eu