Huffman coding is a lossless compression algorithm that is optimal, assuming all input characters are drawn from a known discrete distribution.