The COOLJAPAN compression layer just gained two whole new codecs.
Today we released OxiArc 0.2.5 — pure Rust archive and compression, now with brand-new Brotli and Snappy crates that take the workspace to 12 crates and 12 container formats.
No C. No Fortran. No zlib. No libzip. No libarchive. No 7-zip. 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 (or WASM) and runs everywhere.
Why OxiArc 0.2.5 matters
Handling archives and compression has long meant leaning on heavy native libraries — zlib, libzip, libarchive, 7-zip — with all the baggage that brings:
- Complex build systems and dependency hell
- Security risks from large, aging C codebases
- Platform-specific binaries and vendor lock-in
- Difficulty in WASM, embedded, or no_std environments
- Inconsistent support for legacy formats like LZH and Shift_JIS (still widely used in Japan)
Two of the most-reached-for compression formats were still gaps. Brotli powers a huge share of the modern web’s text and asset payloads; Snappy is the go-to for fast, low-latency data in RPC and streaming systems. Until now, a pure-Rust pipeline that needed either had to pull in the brotli or snap crates. 0.2.5 closes both gaps at once — Brotli and Snappy arrive as brand-new, from-scratch crates — and pushes the workspace to 12 crates and 12 container formats.
Technical Deep Dive: Two New Codec Crates, Plus Streaming Everywhere
OxiArc keeps its layered shape — a core layer, codec crates, a container layer, and a CLI — and 0.2.5 slots two new codec crates cleanly into the Codec Layer.
-
Core Layer (
oxiarc-core) Shared traits and bitstream utilities, now with anEntryBuilderfluent API for constructing archive entries, and optional Serde serialization forEntrytypes (behind aserdefeature). -
Codec Layer — joined by two new crates:
oxiarc-brotli— Brotli compression (RFC 7932): quality levels 0–11 with static dictionary support, LZ77 plus context-dependent Huffman coding, and a streaming compression/decompression API.oxiarc-snappy— Snappy compression: both the block format and the framed format (with CRC32C checksums), behind a streamingWrite/ReadAPI.oxiarc-deflateadds streaming with flush modes:GzipStreamEncoder/GzipStreamDecoder(sync_flush,full_flush,partial_flush) andZlibStreamEncoder/ZlibStreamDecoderwith configurable block sizes.oxiarc-lz4gains an acceleration parameter (compress_block_with_accel) with adaptive skip scaling.oxiarc-lzwgains a streaming encoder/decoder (LzwStreamEncoder/LzwStreamDecoder, TIFF and GIF modes).
-
Container Layer (
oxiarc-archive) Brotli and Snappy archive integration —BrotliReader/BrotliWriter,SnappyReader/SnappyWriter, with format detection — bringing the container set to 12 formats. -
CLI Layer (
oxiarc-cli) A dry-run mode (--dry-run/-n), sort-by-ratio, and Brotli/Snappy format support in the unifiedoxiarcbinary.
This release ships 1,038 tests across 12 crates, all passing, with zero Clippy warnings under -D warnings and zero rustdoc warnings.
Getting Started
0.2.5 is on crates.io. To compress with the new Brotli codec, add the crate:
cargo add oxiarc-brotli # or oxiarc-snappy
use oxiarc_brotli::BrotliEncoder;
// Brotli at a chosen quality (0-11); higher = smaller, slower.
let mut enc = BrotliEncoder::new(11);
let compressed = enc.compress(b"web payloads love Brotli, in pure Rust")?;
Snappy’s framed format (with CRC32C) is just as direct via its streaming Write/Read API. From the CLI, both formats are first-class — and you can preview an operation before it runs:
oxiarc create site.br public/ # Brotli-compressed archive
oxiarc create cache.sz data/ # Snappy-compressed archive
oxiarc create --dry-run backup.zip src/ # preview, write nothing (-n)
What’s New in 0.2.5
- New crate:
oxiarc-brotli. Brotli compression (RFC 7932) — quality levels 0–11 with static dictionary support, LZ77 plus context-dependent Huffman coding, and a streaming compress/decompress API. - New crate:
oxiarc-snappy. Snappy compression — block format and framed format with CRC32C checksums, behind a streamingWrite/ReadAPI. - DEFLATE/GZip/Zlib streaming with flush modes.
oxiarc-deflateaddsGzipStreamEncoder/GzipStreamDecoder(sync_flush,full_flush,partial_flush) andZlibStreamEncoder/ZlibStreamDecoderwith configurable block sizes. - LZ4 acceleration.
oxiarc-lz4gainscompress_block_with_accelwith adaptive skip scaling for speed-over-ratio. - LZW streaming.
oxiarc-lzwaddsLzwStreamEncoder/LzwStreamDecoderin TIFF and GIF modes. EntryBuilderand Serde.oxiarc-coregains a fluentEntryBuilderAPI and optional Serde serialization forEntrytypes (theserdefeature).- Brotli/Snappy in archives.
oxiarc-archiveaddsBrotliReader/BrotliWriterandSnappyReader/SnappyWriterwith format detection — now 12 container formats. - CLI: dry-run and sort-by-ratio.
oxiarc-cliadds--dry-run/-n, sort by ratio, and Brotli/Snappy format support.
Quality this release: zero Clippy warnings (-D warnings), zero rustdoc warnings, and a 100% test pass (1,038 tests).
Tips
Getting the most out of the new codecs and streaming paths:
- Pick a Brotli quality for the payload. Quality runs 0–11; for text and web assets, the higher levels plus Brotli’s static dictionary win on ratio. Drop to mid-range when encode time matters.
- Reach for Snappy’s framed format for fast data. The framed format’s CRC32C checksums make it ideal for in-memory and RPC-style streams where speed and integrity beat maximum ratio.
- Use
GzipStreamEncoderflush modes for protocols.sync_flush/full_flush/partial_flushlet you push complete, decodable chunks down a wire without ending the stream. - Tune
ZlibStreamEncoderblock sizes. Configurable block sizes let you trade latency against ratio for streaming workloads. - Trade ratio for speed with the LZ4 accel param.
compress_block_with_accelskips harder through low-value matches when throughput is the goal. - Preview before you write.
oxiarc create --dry-run/-nshows what an archive op would do — and sort-by-ratio surfaces what’s actually compressing well. - Replace the
brotliandsnapcrates withoxiarc-brotli/oxiarc-snappy. Per COOLJAPAN policy, all compression flows through OxiArc — and now Brotli and Snappy do too, with no C underneath.
This is the foundation
OxiArc is the compression and archival backend other COOLJAPAN projects build on. It still depends on no sibling projects — just small, focused Rust crates — so siblings sit on top of it, not beside it.
At 12 crates and 12 container formats, OxiArc is now the broad sovereign compression backend for the COOLJAPAN stack: OxiMedia for asset packaging, and SciRS2, NumRS2, and PandRS for dataset and long-term storage. With the new codecs in hand, Brotli serves web and text payloads while Snappy serves fast RPC and streaming — each a pure-Rust path where a C library used to sit. It is the quiet data-packaging layer underneath the COOLJAPAN scientific and media stack.
Repository: https://github.com/cool-japan/oxiarc
Star the repo if you want high-performance archiving and compression without the traditional native toolchain headaches.
Pure Rust archiving and compression is here — fast, safe, and sovereign.
— KitaSan at COOLJAPAN OÜ March 18, 2026