Skip to content

ARedSpyder/Huffman-and-Shannon-coding

Repository files navigation

Environment requirement:python 3
Packages :numpy

1.Modify the folder path:

  Line 7 : path = 'C:/Users/guo/Downloads/Fundamentals of Information Theory'
  modify the path to new location

2.Run the code:
  example:
  >>python "C:\Users\guo\Downloads\Fundamentals of Information Theory\get_frequency_of_words.py"

3.Generated file:
  frequency.txt : record the symbols and each frequency
  encode_list_Huffman.txt : record the Huffman code table
  encode_list_Shannon.txt : record the Shannon code table
  encoded_article_with_Huffman.txt : the encoded article with Huffman
  encoded_article_with_Shannon.txt : the encoded article with Shannon
  decoded_article_with_Huffman.txt : the decoded article with Huffman
  decoded_article_with_Shannon.txt : the decoded article with Shannon

About

This project implement the Huffman and Shannon coding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages