COOLJAPAN
← All posts

OxiArc 0.3.1 Released — Archive Repair and Recovery in Pure Rust

OxiArc 0.3.1 adds front-to-back archive repair and recovery for corrupt ZIP and TAR files, custom-dictionary compression for LZH and LZMA, and a thread-safe LZMA memory pool. Pure Rust, no zlib, no libarchive — 1,647 tests passing, zero warnings.

release oxiarc archive compression recovery zip tar lzma pure-rust

When an archive goes bad, you should not need a C toolchain to get your data back.

Today we released OxiArc 0.3.1 — the Oxidized Archiver gains true archive repair and recovery, custom-dictionary compression for LZH and LZMA, and a thread-safe LZMA memory pool.

No C. No Fortran. No zlib. No libarchive. No external shared libraries. No FFI overhead. No build hell. Just clean, memory-safe, blazing-fast archiving and compression that compiles to a single static binary, targets WASM, and runs everywhere.

OxiArc is the Pure Rust replacement for the zip, tar, gzip, zstd, and 7-zip tools — and for the Rust crates zip, flate2, zstd, bzip2, lz4, tar, snap, brotli, and miniz_oxide.

Why 0.3.1 matters

A central directory gets truncated. A download cuts off mid-transfer. A tarball loses its trailer. Until now, a damaged container often meant the bytes were stranded — even when most of the payload was still sitting right there on disk.

OxiArc 0.3.1 changes that. The new repair engine in oxiarc-archive scans archives front-to-back, independent of central-directory or trailer integrity, recovering everything it can verify and telling you exactly what it could and could not save.

Both return a RepairReport { recovered_entries, skipped_ranges, warnings }, with a per-entry RecoveryStatus of Verified, Recovered, or RawOnly so you know precisely how much to trust each byte. For finer control, the same logic is exposed as ZipRepair / TarRepair builder structs configured through RepairOptions.

A focused technical note on the changed areas

Beyond recovery, 0.3.1 brings custom-dictionary compression to two more codecs, mirroring the DEFLATE template that already shipped:

oxiarc-lzma also gains a thread-safe memory pool, LzmaPool, for amortizing the large dictionary-buffer allocations that custom dictionaries demand. It uses power-of-two capacity buckets with a configurable maximum number of buffers per bucket, a PooledBuf<'a> RAII wrapper, and an LzmaDecoderPooled<'p, R> decoder backed by a pooled buffer. The convenience constructors LzmaPool::decode and LzmaPool::decode_from_header get you decoding without touching the buffer plumbing yourself.

Interop coverage grew too: oxiarc-snappy adds 16 integration tests against Google Snappy wire-format golden vectors, and oxiarc-brotli adds 19 covering quality levels 0–11, empty / single-byte / binary / text / large-input roundtrips, and the minimum-window case (lgwin=16).

Getting Started

CLI:

cargo install oxiarc-cli

Library:

cargo add oxiarc-archive
cargo add oxiarc-deflate

A minimal end-to-end example — compress a buffer, then walk a ZIP archive:

use oxiarc_deflate::{deflate, inflate};
use oxiarc_archive::ZipReader;
use std::fs::File;

let compressed = deflate(b"Hello, World!", 6)?;
let decompressed = inflate(&compressed)?;

let file = File::open("archive.zip")?;
let mut zip = ZipReader::new(file)?;
for entry in zip.entries() {
    println!("{}: {} bytes", entry.name, entry.size);
}

From the CLI, repair and inspection are one command away:

oxiarc test archive.zip
oxiarc list archive.zip
oxiarc extract data.tar.gz -o output/

What’s New in 0.3.1

Tips

This is the foundation

Repair and recovery is exactly the kind of resilience the rest of the stack needs from its packaging layer. OxiArc is the archiving and compression backend for the broader COOLJAPAN ecosystem — OxiMedia for video and image asset packaging, SciRS2 / NumRS2 for dataset compression and long-term storage, OxiGDAL for geospatial file archiving, ToRSh / OxiRAG for high-throughput data ingestion, and RusMES for mail attachment handling. When a stored dataset or distributed bundle gets damaged in transit, repair_zip and repair_tar mean the data is still reachable — in Pure Rust, with no native toolchain in sight.

Repository: https://github.com/cool-japan/oxiarc

Star the repo if you want archiving, compression, and now recovery without the traditional native toolchain headaches.

The era of “just use zlib” or “link libarchive” is coming to an end.

KitaSan at COOLJAPAN OÜ May 30, 2026

↑ Back to all posts