Question: Please use php to solve that! 6. 75 points Program C Huffman Coding For this program you will implement Huffman Coding. The program will take

 Please use php to solve that! 6. 75 points Program C

Please use php to solve that!

6. 75 points Program C Huffman Coding For this program you will implement Huffman Coding. The program will take a file name as a command line argument, process it, and produce a prefix-free, variable length binary encoding that minimizes the average codeword length Page 5 of6 CSCE 310 Assignment 2 Summer 2018 In addition, your program should output: the encoding, the average codeword length, the total number of bits in the original file (simply the total number of characters multiplied by 8), the total number of bits in the encoded file, and the compression ratio. Your output should resemble something like Character Codeword F requency 17. 7848% 1 1 1 01111011100 0.0502% 1101010 1.0038% 011110110 0.2008% 0111100 0.7194% 1101011100010 0.0167% 1010111000 0.1004% 2 101011101 0.2175% 10101111010 0.0669% 10101111011 0.0669% 10101110010 0.0502% [output truncated for length] Average Codeword Length: 4.386 bits Original Size (bits): 47816 Encoding Size (bits): 26219 Compression Ratio: 54.833% 6. 75 points Program C Huffman Coding For this program you will implement Huffman Coding. The program will take a file name as a command line argument, process it, and produce a prefix-free, variable length binary encoding that minimizes the average codeword length Page 5 of6 CSCE 310 Assignment 2 Summer 2018 In addition, your program should output: the encoding, the average codeword length, the total number of bits in the original file (simply the total number of characters multiplied by 8), the total number of bits in the encoded file, and the compression ratio. Your output should resemble something like Character Codeword F requency 17. 7848% 1 1 1 01111011100 0.0502% 1101010 1.0038% 011110110 0.2008% 0111100 0.7194% 1101011100010 0.0167% 1010111000 0.1004% 2 101011101 0.2175% 10101111010 0.0669% 10101111011 0.0669% 10101110010 0.0502% [output truncated for length] Average Codeword Length: 4.386 bits Original Size (bits): 47816 Encoding Size (bits): 26219 Compression Ratio: 54.833%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!