Package jbig2 provides the jbig2 standard image Encoder and Decoder. All the comments reference to the 'ISO/IEC 14992 INFORMATION TECHNOLOGY - CODED REPRESENTATION OF PICTURE AND AUDIO INFORMATION - LOSSY/LOSSLESS CODING OF BI-LEVEL IMAGES JBIG committee 1999 July 16' document. The document is available and can be downloaded at: 'https://github.com/agl/jbig2enc/blob/master/fcd14492.pdf'
The decoder was based on the 'Apache PDFBox JBIG2 Java plugin' which can be found at: 'https://github.com/apache/pdfbox-jbig2'.
decode.go doc.go globals.go
DecodeBytes decodes jbig2 'encode' byte slice data, with provided 'parameters' and optional 'globals'. The function decodes only a single page from the given input.
Globals is the v3 mapping of the jbig2 segments to header mapping.
DecodeGlobals decodes globally defined data segments from the provided 'encoded' byte slice.
ToDocumentGlobals converts 'jbig2.Globals' into '*document.Globals'