Lossless compression reduces redundancy to represent data with fewer bits. Classic techniques include prefix codes (Huffman), arithmetic coding for near-entropy rates, and dictionary methods (LZ77/LZ78/LZW).
Details
Concepts
Huffman coding: optimal prefix code for known symbol probabilities; average length ≤ H(X) + 1.
Arithmetic coding: encodes entire message into an interval; achieves rates close to entropy, supports adaptive models.
LZ family: dictionary-based. LZ77 (sliding window), LZ78 (growing dictionary), LZW (variant used in GIF).
Modeling: static vs adaptive; context models; trade-off between complexity and compression ratio.