Question: You are going to implement a data compression program in Python using Huffman codes and the Burrows - Wheeler transform, which, together, form the basis
You are going to implement a data compression program in Python using Huffman codes and the BurrowsWheeler transform, which, together, form the basis of the bzip compression algorithm. Bzip consistently compresses at better ratios than ubiquitous compression algorithms like gzip and PKZIP. The basic idea behind the compression algorithm is: Transform an input text file into a text file where the same letter appears more frequently together. We accomplish this with the BurrowsWheeler transform BWT Convert the BWT into a text file where small integers appear more frequently than large ones, or movetofront encoding. Given a BWT and movetofront encoded text, compress it by encoding common letters with short codewords and rare letters with long codewords, or Huffman encoding. Your task will be to implement an efficient inverse BWT and Huffman encoding and decoding. We provide a framework; you will fill in several functions. Your choice of internal representations is up to you. A stub file, bwt huffman.py is available for download on HuskyCT.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
