Question: PLEASE provide test code and Huffman encoding table. In this assignment, you will implement the Huffman encoding of English characters, using a combined list and

PLEASE provide test code and Huffman encoding table.

PLEASE provide test code and Huffman encoding table. In this assignment, youwill implement the Huffman encoding of English characters, using a combined list

and binary tree data structure. The method should have the following signature

In this assignment, you will implement the Huffman encoding of English characters, using a combined list and binary tree data structure. The method should have the following signature public static String huffmanCoder(String inputFileName, String outputFileName); which will read and compress an input text file inputFileName, (based on the Huffman encoding produced on the input file) and output the compressed file in outputFileName NOTE: that these strings represent the file names, not content you need to perform file I/O The method will output the outcome of its execution, e.g., "OK", "Input file error", etc. The output file can simply contain the characters "O" and "1", instead of the binary bits. It means you are not required to use sophisticated binary bit operations to actually store the encoded characters. NOTE: Since, you will be translating each character into a sequence of zeros and ones, the sum representing the full character, your output file size will actually be significantly larger than the input file. Therefore, Decompressing a file is not required. The program should also print out (a) The Huffman encoding of characters in the form of a table of character/frequency/ character/frequency/encoding triples - one triple per line, with "." separating the elements, e.g a: 315: 10010 b 855: 1010 (b) The calculated amount of space savings (see below for details) You will need to use a Java's standard list facility but implement your own HuffmanNode class with the following fields inChar: the character denoted by the node. This is meaningful only for the leaf nodes of a Huffman tree so interior nodes can have garbage here. right: right child of a node in the Huffman tree In this assignment, you will implement the Huffman encoding of English characters, using a combined list and binary tree data structure. The method should have the following signature public static String huffmanCoder(String inputFileName, String outputFileName); which will read and compress an input text file inputFileName, (based on the Huffman encoding produced on the input file) and output the compressed file in outputFileName NOTE: that these strings represent the file names, not content you need to perform file I/O The method will output the outcome of its execution, e.g., "OK", "Input file error", etc. The output file can simply contain the characters "O" and "1", instead of the binary bits. It means you are not required to use sophisticated binary bit operations to actually store the encoded characters. NOTE: Since, you will be translating each character into a sequence of zeros and ones, the sum representing the full character, your output file size will actually be significantly larger than the input file. Therefore, Decompressing a file is not required. The program should also print out (a) The Huffman encoding of characters in the form of a table of character/frequency/ character/frequency/encoding triples - one triple per line, with "." separating the elements, e.g a: 315: 10010 b 855: 1010 (b) The calculated amount of space savings (see below for details) You will need to use a Java's standard list facility but implement your own HuffmanNode class with the following fields inChar: the character denoted by the node. This is meaningful only for the leaf nodes of a Huffman tree so interior nodes can have garbage here. right: right child of a node in the Huffman tree

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!