The COOLJAPAN compression layer just grew an image codec.
Today we released OxiArc 0.2.0 — pure Rust archive and compression, now with a full LZW implementation for TIFF and GIF and availability on crates.io.
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.0 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)
0.2.0 closes a real gap. LZW is the compression scheme behind GIF and TIFF, and until now a pure-Rust pipeline that touched raster images still had to pull in an outside codec for it. With oxiarc-lzw, that part of the image stack is now sovereign too — and the whole workspace is a cargo install away.
Technical Deep Dive: The New LZW Codec
OxiArc keeps its layered shape — a core layer, codec crates, a container layer, and a CLI — and 0.2.0 slots a new codec crate cleanly into the Codec Layer.
-
Core Layer (
oxiarc-core)
SharedCompressor/Decompressortraits, CRC-32/64/16 with slicing-by-8, and bitstream utilities. In 0.2.0,oxiarc-lzwnow consumesoxiarc-coreviaworkspace = true, tightening dependency management across the tree. -
Codec Layer — now joined by
oxiarc-lzw, a complete LZW implementation:- Both MSB-first and LSB-first bitstreams — the two orderings GIF and TIFF disagree on.
- Variable bit width — 9–12 bits for TIFF, 2–12 bits for GIF.
- Configurable TIFF/GIF modes, so you pick the dialect that matches your format.
-
Container Layer (
oxiarc-archive)
ZIP, TAR, GZIP, LZH, XZ, and friends — the 10-format container set carried forward from 0.1.0. -
CLI Layer (
oxiarc-cli)
The unifiedoxiarcbinary, now built and tested with newer tooling.
With LZW in place the workspace reaches 10 crates, and the comprehensive suite grows to 427 tests — all passing, with zero Clippy warnings under -D warnings, zero rustdoc warnings, and a clean security audit (0 vulnerabilities across 131 scanned dependencies).
Getting Started
0.2.0 is on crates.io. Install the CLI:
cargo install oxiarc-cli # the `oxiarc` CLI
Or pull in just the crates you need as a library:
cargo add oxiarc-archive # or oxiarc-deflate / oxiarc-lzw / ...
The library API is unchanged and ergonomic:
use oxiarc_deflate::{deflate, inflate};
use oxiarc_archive::ZipReader;
use std::fs::File;
let compressed = deflate(b"Hello, World!", 6)?; // level 0-9
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);
}
What’s New in 0.2.0
- New crate:
oxiarc-lzw— complete LZW compression for TIFF and GIF, with MSB-first and LSB-first bitstreams, variable bit width (9–12 bits for TIFF, 2–12 bits for GIF), and configurable TIFF/GIF modes. The workspace is now 10 crates. - crates.io availability —
cargo install oxiarc-cliandcargo addnow work; no more build-from-source required. - A much faster test suite — resource-intensive stress tests are now marked
#[ignore], cutting the defaultcargo testruntime from 137s to 32s (76% faster). Run the heavy ones withcargo test -- --ignored. - More documentation — new README guides for
oxiarc-bzip2,oxiarc-lz4,oxiarc-lzw, andoxiarc-zstd. - Dependency and workspace cleanup — bumps to clap 4.5.57, clap_complete 4.5.65, and criterion 0.8.2; improved workspace dependency management (
oxiarc-lzwusesworkspace = trueforoxiarc-core); and version sync across all 10 crates.
Quality this release: zero Clippy warnings (-D warnings), zero rustdoc warnings, 100% test pass (427/427), and a clean security audit (0 vulnerabilities, 131 dependencies scanned).
Tips
Getting the most out of the new codec and the faster suite:
- Pick the right LZW dialect. Use the TIFF mode for TIFF data and the GIF mode for GIF — they differ in both bit-width range and defaults, and mismatching them produces garbage.
- Mind the bit order. GIF expects LSB-first packing while TIFF is MSB-first.
oxiarc-lzwsupports both; set the ordering to match the consumer. - Run the stress tests on demand. The fast default suite skips the heavy cases; before a release, run
cargo test -- --ignoredto exercise them. - Add only what you need. For an image pipeline,
cargo add oxiarc-lzwpulls in the LZW codec without the rest of the archive stack. - This is the codec GIF and TIFF actually use. If you were reaching for an image library mainly for its LZW path,
oxiarc-lzwreplaces that piece with a pure-Rust equivalent.
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.
With LZW in hand, OxiArc now covers the raster-image compression that NumRS2, PandRS, and SciRS2 pipelines run into — GIF and TIFF handling included — alongside the dataset compression and long-term storage they already lean on. It is the quiet data-packaging layer underneath the COOLJAPAN scientific 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Ü February 6, 2026