...This encoder can:
Generate JBIG2 files, or fragments for embedding in PDFs
Generic region encoding
Perform symbol extraction, classification and text region coding
Perform refinement coding and,
Compress multipage documents
It uses the (Apache-ish licensed) Leptonica library: http://leptonica.com/