-
Notifications
You must be signed in to change notification settings - Fork 2
Home
packJPG is a lossless JPEG recompressor. It rewrites a .jpg file as a smaller .pjg file that decodes back to the bit-exact original JPEG. Typical reduction: 20–25 %.
Current release: v4.0d (LTS) — speed-polish update of the v4.0 LTS line. Format unchanged from v4.0c, encode/decode 6–14 % faster, ratio identical.
- Install → see the README
- Quick start → README › Usage
- CLI reference → README › Command-line switches
- FAQ — common questions
- Troubleshooting — known errors and workarounds
- Use cases — what packJPG is good (and not good) for
- Build from source → docs/howtocompile.md
- Versioning policy → docs/versionnumbering.md
- Developer functions → docs/developer.md
- Comparison with other tools — packJPG vs Brunsli vs Lepton vs JXL
-
Migration from upstream — for users coming from
packjpg/packJPG - Release archive — historical release index
A JPEG file is a sequence of DCT coefficient blocks Huffman-coded with a fixed table. packJPG reverses the Huffman step, reorganizes the coefficients into per-component / per-position streams, and re-encodes them with a stronger arithmetic coder (PPM order-2 model). The result is byte-exact decompressible back to the original JPEG — same DCT data, same headers, same metadata, same bit-for-bit file.
Use it when you need the original JPEG back later (archival, version control of image-heavy repos, hosted-image "download original" buttons, photo backups). Don't use it for serving images on the web — re-encoding to WebP/JXL/AVIF makes more sense there.
The v4.0 line is the current LTS. v4.0d is its latest update and the last with feature work. Future updates within this LTS line (v4.0e, v4.0f, …) will be bug-fix only.
Ratio plateau confirmed empirically — see Comparison with other tools for the numbers vs Brunsli, Lepton, and JXL.
Use the Issues tab. Please include:
- packJPG version (
packJPG -vor banner output) - OS and architecture
- A sample
.jpgthat reproduces the problem (or a description if confidentiality forbids) - The exact command line and the full error message
Huge thanks to Matthias Stirner (@packjpg) — the original creator of packJPG. This fork stands entirely on the algorithm and codebase he authored and released as open source. See Migration from upstream for the relationship between this fork and his original repository.