NOTE: This page is deprecated.
Future releases, when available, will be posted on ghostscript.com
And up to date sources are available here: jbigdec git

jbig2dec is a decoder implementation of the JBIG2 image compression format. JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit monochrome) images at moderately high resolution, and in particular scanned paper documents. In this domain it is very efficient, offering compression ratios on the order of 100:1.

This is a decoder only implementation, and currently is in the alpha stage, meaning it doesn't completely work yet. However, we are maintaining parity with available encoders, so it is useful for real work.

The specificication has been published as ISO IEC 14492 and ITU T.88. These documents completely describe the format and they'll be required if you want to understand the code and contribute. We prefer the ISO version, but haven't discovered significant differences between the two.

JBIG2 also includes the CCITT T.4 and T.6 (group 3 and group 4) fax encodings, which are documented separately. Their specifications and T.88 can be obtained from the ITU. The ISO version of JBIG2 can be obtained through the ISO website.

Unfortunately none of these documents are free, though the ITU sometimes offers free download specials. More information about JBIG2 and a copy of the draft spec are available from the JPEG website. The earlier CCITT versions of the fax standards are also available for free here and here. Unfortunately these particular versions seem to be missing the figures.


The code is in initial development and while capable of decoding most documents found in the wild, it isn't yet a complete implementation. Work in progress is available from git.ghostscript.com.

The latest release is jbig2dec 0.11.

For testing, we include one example file from the draft spec.

Dave Tompkins put together a excellent test suite. We have our own mirror of the 'UBC' bitstreams available here. The files were originally available from his site at UBC, but have since disappeared.

CVision offers some PDF-embedded example files from their CVista compressor. Likewise Adobe has some examples available from their encoder. The raw bitstreams will need to be extracted from the PDF wrapper before they can be fed to jbig2dec, or you can link recent versions of Ghostscript with the jbig2dec library and use that to parse the pdf files directly.


The development discussion list is here. The source repository is here.

You can generally find the developers in #ghostscript on irc.freenode.net.

[ghostscript] Produced in association with ghostscript. [sourceforge]