How does information theory help determine the maximum possible compression of text?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In information theory, the maximum theoretical compression of text is determined by the concept of entropy. Entropy serves as a mathematical measure of the efficiency of an encoding scheme, representing the lower bound on the average number of bits required to represent symbols from a given source.1

If the entropy of a message alphabet is lower than the average length of its current encoding, further compression is mathematically possible. For instance, while standard coding often uses 8 bits per character, the entropy of large samples of English text is approximately 4 bits per character, suggesting that an encoding twice as efficient is theoretically achievable.1

In practice, compression algorithms approach these limits by modeling the probability distribution of characters or sequences. While static models like Huffman codes rely on known frequencies, adaptive methods—such as the Lempel-Ziv algorithm—dynamically build dictionaries based on the text itself to identify and replace repetitive patterns with shorter codes.123