This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A program that accepts a given text and generates its Huffman code and | |
| # Shannon–Fano–Elias code, as well as additional information. | |
| # | |
| # Created as part of an assignment for ECE 253 at UC Santa Cruz. | |
| import heapq | |
| import math | |
| import textwrap | |
| from collections import Counter |