{'fraction_non_alphanumeric': 0.023579849946409433, 'fraction_numerical': 0.0, 'mean_word_length': 5.486111111111111, '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}}
A Theory of Lossy Compression for Individual Data

We develop rate-distortion theory for individual data with respect to general distortion measures, that is, a theory of lossy compression of individual data. This is applied to Euclidean distortion, Hamming distortion, Kolmogorov distortion, and Shannon-Fano distortion. We show that in all these cases for every function satisfying the obvious constraints there are data that have this function as their individual rate-distortion function. Shannon’s distortion-rate function over a random source is shown to be the pointswise asymptotic expectation of the individual distortion-rate functions we have defined. The great differences in the distortion-rate functions for individual non-random (that is, the aspects important to lossy compression) data we established were previously invisible and obliterated in the Shannon theory. The techniques are based on Kolmogorov complexity.