Entropy coding is a lossless data compression scheme that assigns shorter binary codes to more frequent symbols and longer codes to less frequent symbols, minimizing the average code length to approach the theoretical limit defined by Shannon's source coding theorem. Core algorithms include Huffman coding, which builds an optimal prefix code from symbol frequencies, and arithmetic coding, which encodes an entire message into a single high-precision fractional number for superior compression, especially with skewed probability distributions. This technique is fundamental to formats like ZIP, PNG, and modern neural network compression pipelines such as Deep Compression.
