Question: Write a program that compresses a source file into a target file using the Huffman coding method. First use ObjectOutputStream to output the Huffman codes
Write a program that compresses a source file into a target file using the Huffman coding method. First use ObjectOutputStream to output the Huffman codes into the target file, and then use BitOutputStream in Programming Exercise 17.17 to output the encoded binary contents to the target file. Pass the files from the command line using the following command:
java Exercise25_18 sourcefile targetfile
Step by Step Solution
3.32 Rating (164 Votes )
There are 3 Steps involved in it
Program Plan Create a class Exercise2518 which compress a source file data and store it in a target file using Huffman coding Create a class BitOutputStream which creates a bit output stream for file ... View full answer
Get step-by-step solutions from verified subject matter experts
