r/Paperlessngx • u/dergutegeist • 23m ago
jbig2-tools: Fast, zero-dependency JBIG2 toolkit for 1-bit scans & PDFs (Windows & Linux)
0
Upvotes
jbig2-tools is an open-source C++20 toolkit for 1-bit B&W document compression (ITU-T T.88), available as a standalone CLI, shared library (libjbig2.so / jbig2_wic.dll), Windows Explorer codec, and Linux .deb package.
- Lossless compression: 0-bit diff across 107 test files, ~50% smaller than PNG on average, up to 16× faster than
jbig2enc - PDF & Pipe support: Direct
/JBIG2GlobalsPDF stream export andstdinpipe (convert ... pbm:- | jbig2-cli encode -) - Optional
LossySafemode: Additional 25–51% size reduction on 300 DPI scans with a 4-stage Xerox-bug guard (small-glyph protection, hole topology check, 0× 2×2 XOR blocks) - Desktop integration: Native thumbnails in Windows Explorer and Linux file managers (Nautilus, Thunar, Nemo, Caja)
Standalone CLI/library (not a Paperless-ngx plugin), suitable for pre-processing or JBIG2/PDF archiving workflows.
Repository: https://github.com/cookie667-gh/jbig2-tools