Skip to content

purejq 0.3.0 — streaming + more CLI flags

Choose a tag to compare

@adam2go adam2go released this 16 Jun 04:59

Two feature areas this release, both verified byte-identical to jq 1.8.1.

Constant-memory streaming for huge files

New --stream flag parses input incrementally and emits jq's [path, leaf]
events, so you can process files larger than RAM:

purejq -n --stream 'fromstream(1|truncate_stream(inputs)) | select(.v > 0)' huge.json

On a 56 MB array of 2M records, reconstructing every element peaks at
22 MB RSS streaming vs 612 MB loading the array whole — 28x less memory,
identical output. Matches jq --stream event-for-event (scalars, nesting,
empty containers, top-level arrays, multi-value input); truncated input is
reported as a parse error.

More jq CLI flags

-R/--raw-input, -S/--sort-keys, -a/--ascii-output, --indent N,
--tab — all cross-checked against jq 1.8.1. Plus -V/--version and a
py.typed marker for type checkers.

Conformance unchanged at 751/781. New CLI test suite (24 cases).