{'fraction_non_alphanumeric': 0.012757605495583905, 'fraction_numerical': 0.0068694798822374874, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Text Image Compression Using Soft Pattern Matching

We present a method for both lossless and lossy compression of bi-level images that consist mostly of printed or typed text. The key feature of the method is soft pattern matching, a way of making use of the information in previously encountered characters without risking the introduction of character substitution errors. We can obtain lossless compression which is about 20% better than that of the JBIG standard by direct application of this method. By allowing some loss based partly on the pattern matching using a technique called selective pixel reversal, we can obtain compression ratios about 2-4 times the compression ratios of JBIG and 3-8 times those of G3 facsimile with no visible loss of quality. If used in facsimile machines, these compression improvements would translate directly into communication cost reductions of the same factors, or into the capability of transmitting images at higher resolution with no increase in the number of bits sent.