In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression.