subject

Part I: Write a program to compress a source file into a target file using the Huffman coding method. First, use ObjectOutputStream to output the Huffman codes into the target file, then use BitOutputStream from Assignment #2 to output the encoded binary contents to the target file. Pass the files from the command line using something like the following command: C:\Users\ > java Compress_a_File sourceFile. txt compressedFile. txt
When I did this for my source file, I got a compressed file that looked something like the following:
¬í w Zur [Ljava. lang. String;­ÒVçé{G xp t 01101ppt 11010t 100t 10101pt 1111010t 011000t 1010011pt 1111011pt 1101110t 110110t 1101111t 00000t 01111t 010t 101000pt 00001t 11111ppt 01110t 00010t 00011t 1110t 111100pt 1011t 001t 1100t 011001pppt 1010010 û§Åµ©iõÓwœ°Í­MîeWM÷t¦tËDÌÌ£îUÓXæ=…å ¢gògw
Part II: Write a second program, Decompress_a_File. java, to decompress a previously compressed file so that it replicates the original source file in Part I above. You would do this at the command line with a command that looks like the following:
C:\Users\...> java Decompress_a_File compressedFile. txt decompressedFile. txt
When I ran this second program on my compressed file from Part I above I got:
Roses are red,
Violets are blue,
Try to compress this file,
And then decompress it too.
All groups will consist of 4-5 students, who will be assigned to their groups by the instructor. Groups will be further broken into subgroups, i. e., 2-3 students will be responsible for Part I to compress a source file, and 2 students will assume responsibility for Part II of the project to decompress a compressed file. Both subgroups will be responsible for ensuring that both parts are in synch.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 19:50
Which is a characteristic of free and open-source software licenses? a. the source code is unavailable to everyone b. the source code is available only to the government c. the source code is available to all users d. the source code is constantly modified
Answers: 1
You know the right answer?
Part I: Write a program to compress a source file into a target file using the Huffman coding method...
Questions
question
Mathematics, 17.11.2020 21:10
question
Mathematics, 17.11.2020 21:10
question
Business, 17.11.2020 21:10
Questions on the website: 13722360