JBIG2

Regions that are neither text nor halftones are typically compressed using a context-dependent arithmetic coding algorithm called the MQ coder.

Typically, a bi-level image consists mainly of a large amount of textual and halftone data, in which the same shapes appear repeatedly.

If a match exists, we code an index of the corresponding representative bitmap in the dictionary and the position of the character on the page.

Typical procedures of pattern matching and substitution algorithm are displayed in the left block diagram of the figure above.

Although the method of PM&S can achieve outstanding compression, substitution errors could be made during the process if the image resolution is low.

This allows decoder to successfully render a halftone image by presenting indexed dictionary bitmap patterns neighboring with each other.

[13][14][15] Some implementations of JBIG2 using lossy compression can potentially alter the characters in documents that are scanned to PDF.

[17] In 2013, various substitutions (including replacing "6" with "8") were reported to happen on many Xerox Workcentre photocopier and printer machines.

This has been demonstrated on construction blueprints and some tables of numbers; the potential impact of such substitution errors in documents such as medical prescriptions was briefly mentioned.

[20][21] Xerox subsequently acknowledged that this was a long-standing software defect, and their initial statements in suggesting that only non-factory settings could introduce the substitution were incorrect.

[22] Documents previously scanned continue to potentially contain errors making their veracity difficult to substantiate.

[23] In Germany the Federal Office for Information Security has issued a technical guideline that says the JBIG2 encoding "MUST NOT be used" for "replacement scanning".

Block diagrams of (left) pattern matching and substitution method and (right) soft pattern matching method