Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 813 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 813 Bytes

shannon_fano

The script implements Shennon-Fano coding algorithm.
For more details, have a look at the wiki page: Shannon-Fano
Moreover, the script calculates some additional info:

  • H_max -> Maximum Entropy message source
  • h -> The entropy of the message source
  • l_cp -> The average number of binary digits in the code letter
  • K_c.c. -> The static compression coefficient
  • K_o.э. -> The relative efficiency coefficient

Script can accept:

  • an entire message which need to be encrypted
  • a dictionary which indicates involved letters and their frequencies

Pay attention: script builds the code using only binary coding