Skip to content

PJA 0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 03:32
· 155 commits to main since this release

libpja: PJA as a C library and as a codec for 7-Zip and 7-Zip-zstd.

7z a -m0=PJA -m1=LZMA2 photos.7z photos/      # 7-Zip-zstd: -m1=zstd
  • In 7-Zip. Put pja.dll (or pja.so) from pja-0.2.0-lib-<platform>
    in the Codecs folder next to 7-Zip; 7z i lists 37F01 PJA. PJA goes
    first in the chain as a filter: it recompresses the JPEG and JPEG-LS
    files it finds in the solid block and passes every other byte on to
    LZMA2 or zstd, which match what PJA cannot (EXIF, other files, and one
    image saved several times, which PJA turns into the same coefficient
    stream). Extracting needs the plugin too. Works with 7-Zip on
    Windows and 7-Zip 23 or later on Linux and macOS (not p7zip).

  • How much, 7-Zip 25 on Linux, 8 threads, one archive per set:

    set 7-Zip + PJA + LZMA2 Aqueous pja alone
    151 photos 72.60% 80.46% 72.61%
    78 JPEGs of every kind 66.90% 71.91% 70.39%
    6 MPO 73.40% 78.94% 73.38%
    244 arithmetic-coded 17.37% 85.71% 74.59%
    640 generated 16.52% 33.96% 73.73%

    On the photos, 21 s to write the archive and 7.8 s to extract it (zstd
    in 7-Zip-zstd: 15.5 s); Aqueous is still far faster (2.3 / 0.7 s).

  • As a library, pja.h: a file in memory to a .pja and back, and the
    filter over read/write callbacks for any archiver that writes many files
    as one stream. Thread-safe; errors are return codes. doc/LIBRARY.md
    has the filter's format and everything measured.

  • The filter and 7-Zip's side are C (pas/lib/pjafilter.c, pja7z.c);
    files are compressed in batches on several threads, and the stream
    depends only on the input (not on threads or read sizes).

  • The method ID, 03 7F 01, is 7-Zip's slot for an experimental method,
    until 7-Zip assigns PJA its own; archives written with it will keep
    opening.

  • The pja command and the zpaq-std plugin are 0.1.0's: the same streams.

Downloads

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

pja-0.2.0-zpaqstd.tar.gz has the plugin's sources as zpaq-std vendors them, with VENDOR.md. The command's archives carry pja (or pja.exe), the README, the license, NOTICE and the command's manual (CLI.md); libpja's carry the library, pja.h and LIBRARY.md. Every binary is built and checked by CI on its own platform (.github/workflows/release.yml), libpja 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 (xattr -d com.apple.quarantine after unpacking).
Also checked before publishing, with these very binaries: on Windows 10, 7-Zip 26.05 and 7-Zip-zstd 26.02, 64 and 32 bits, the plugin listed, an archive written, tested and extracted byte for byte, and one written on Linux extracted; on Linux, 7-Zip 25.01 and 7-Zip-zstd 26.02 the same way.