ShannonFanokoodaus
ShannonFanokoodaus, often referred to as Shannon-Fano coding, is a type of lossless data compression algorithm. It was developed by Claude Shannon and Robert Fano in the late 1940s. The algorithm works by assigning binary codes to symbols based on their probabilities of occurrence. Symbols that appear more frequently are assigned shorter codes, while less frequent symbols receive longer codes.
The process begins by ordering the symbols according to their probabilities in descending order. Then, the
Shannon-Fano coding is a prefix code, meaning that no code is a prefix of another code. This