Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/znippy-zoomies

.nornir/ljar-guide.md

ljar — guide

Class: guide · Function: ljar. Build, run, tune. The shape is in ljar-design.md; the why in ljar-reasoning.md. The ZIP-superset twin is lzip-parallel-guide.md.

Build

CARGO_TARGET_DIR=/mnt/work4t/cargo-target/zoomies cargo build --release -p ljar

Binary lands at target/release/ljar.

Run

ljar app.jar                 # extract every entry into ./ (each its own file)
ljar app.jar -o out/         # extract into a target dir
ljar app.jar --filter pom.xml  # only entries whose name contains the needle

Any file jar/zip wrote decodes — ljar reads the stock ZIP container (JAR ⊂ ZIP). Entries are extracted to independent files by the parallel writer (gatling::parwrite::extract_entries_unordered, ljar/src/bin/ljar.rs:146); a --filter excludes non-matching entries at the Central Directory level, so they are never read or inflated.

Tune

Library

// in-memory decode (parallel; streams internally above 10 MB):
let entries = ljar::decompress_jar(&bytes)?;              // ljar/src/lib.rs:65
// only entries containing a needle (filtered before inflate):
let poms = ljar::decompress_jar_filter(&bytes, "pom.xml")?;  // ljar/src/lib.rs:83
// stream any Read+Seek without loading the file into RAM:
let f = std::fs::File::open("app.jar")?;
let entries: Vec<_> = ljar::decompress_jar_stream(f)?;    // ljar/src/lib.rs:98

Bench

Driven by nornir through the shared harness — see decompressors-guide.md. HEAVY only (no smoke): nornir bench run znippy-zoomies, then nornir docs book znippy-zoomies to fill the A/B/C mashup.