Skip to content

PJA 0.9.5

Choose a tag to compare

@github-actions github-actions released this 06 Nov 19:53
· 48 commits to main since this release

JPEG 2000, and the last speed for the stable formats.

  • JPEG 2000. PJA now recompresses JP2, J2K/J2C, JPX, JPM, MJ2 and JPH files byte for byte, as codec stream version 8. Each codestream is taken apart and put back exactly (packet headers, the MQ coder and the way each encoder ends its segments: OpenJPEG, JasPer, Kakadu 2.0-8.0, LuraTech, Adobe, Aware, ECW), and stored in the smallest of three modes:
    • mode 1: the coefficients' decisions through a context-mixing model: about 8% smaller on real files;
    • mode 2, for complete lossless codestreams: the pixels, with an image model, and the codestream regenerated from them: scanned 1-bit book pages about 70% smaller (better than JBIG1);
    • mode 0: as bytes (HTJ2K, Part 2, damaged files).
113 real JPEG 2000 codestreams (150 MB: Internet Archive, Library of Congress, OSGeo, Helioviewer, Sentinel-2, DICOM) size
bzip2 -9 / bzip3 100.18% / 100.05%
zip -9, gzip -9, xz -9e, 7-Zip -mx=9 99.76 - 99.81%
zstd --ultra -22, brotli -q 11, zpaq -m5 99.56 - 99.72%
PJA 0.9.5 91.53%
  • Faster, the same bytes. The raw-byte model (metadata, ICC profiles) in C, the largest files first, JPEG-LS's two models at once, a large file's headers on threads, and a thread wait that no longer sleeps 100 ms: the 78-file corpus -47% to compress and -45% to extract, JPEG-LS -29%, a JPEG with a large ICC profile -54%, short files on several threads up to 7 times faster.
  • For people who want to help. pja report FILE writes a bug report (no image data, no metadata contents) and a prefilled issue link; pja info shows a file's structure and what PJA does with it; pja t checks .pja files without writing; pja bench, pja selftest (built-in samples on every CPU path), --version, --cpu=plain|sse41|avx2, --stats and --json. An internal error now says it is a bug and how to report it. See doc/CLI.md and the issue form.
  • Durable writes. An output is flushed to the disk before it takes its name (and its directory after), so a power cut leaves the old file or the whole new one; --no-sync skips it. Ctrl-C, a kill, a closed terminal or a closed pipe delete the temporaries being written; leftovers from a killed run are reported, and --clean-temps deletes them (PJA's own, old, of a process that is gone, never through a link).
  • Stable. The formats of 0.9.0 are unchanged: the command writes the same .pja files for JPEG and JPEG-LS, and the thirty zpaq-std codecs and their ZPAQL are 0.9.0's. Stream version 8 (modes 0, 1 and 2) joins what is fixed (doc/STABILITY.md). libpja answers PJA_E_VERSION for what a newer PJA wrote, and the 7-Zip plugin says "Unsupported Method" for it instead of "Data Error"; 7-Zip now shows the plugin's version as 0.95 (it said 0.05).
  • Checked: every JPEG 2000 file taken in a 2,300-codestream corpus comes back byte for byte, the 57 OpenJPEG conformance codestreams included; about a million damaged inputs with no crash or hang; Windows 10 (pja.exe, 7-Zip 25.01 with the plugin, zpaq-std 2.3.0 with and without the plugin).

Downloads

platform the pja command the zpaq-std plugin libpja (C library, 7-Zip plugin)
Linux x86-64 pja-0.9.5-linux-x86_64.tar.gz pja-0.9.5-zpaqstd-plugin-linux-x86_64.tar.gz pja-0.9.5-lib-linux-x86_64.tar.gz
Linux x86 (32-bit) pja-0.9.5-linux-x86.tar.gz pja-0.9.5-zpaqstd-plugin-linux-x86.tar.gz pja-0.9.5-lib-linux-x86.tar.gz
Linux arm64 pja-0.9.5-linux-arm64.tar.gz pja-0.9.5-zpaqstd-plugin-linux-arm64.tar.gz pja-0.9.5-lib-linux-arm64.tar.gz
macOS arm64 pja-0.9.5-macos-arm64.tar.gz pja-0.9.5-zpaqstd-plugin-macos-arm64.tar.gz pja-0.9.5-lib-macos-arm64.tar.gz
Windows x64 (7 and later) pja-0.9.5-windows-x64.zip pja-0.9.5-zpaqstd-plugin-windows-x64.zip pja-0.9.5-lib-windows-x64.zip
Windows x86 (XP and later) pja-0.9.5-windows-x86.zip pja-0.9.5-zpaqstd-plugin-windows-x86.zip pja-0.9.5-lib-windows-x86.zip

pja-0.9.5-zpaqstd.tar.gz holds the plugin's sources as zpaq-std vendors them, with VENDOR.md. CI builds and checks every binary on its own platform (.github/workflows/release.yml); libpja is checked with its C test and, on Linux x86-64, through a real 7-Zip. SHA256SUMS has the checksums. The Linux builds need glibc 2.34 or later. The macOS ones are not signed: run xattr -d com.apple.quarantine after unpacking.