讲解:CSI 403、Huffman encoding algorithm、C/C++、C/C++Haskell

CQUPT – University at AlbanyComputer Science – International CollegeCSI 403 --- Algorithms and Data StructuresProgramming Assignment 3 --- Fall 2018 (Draft Copy)Purpose of the ProjectThe primary goal of this exercise is to develop a simple tool to both compress and decompress files using the Huffman encoding algorithm. A secondary goal of the exercise is to develop skills for working with heaps, priority queues, and Huffman trees. To DoYour solution will use the Huffman coding algorithm to both compress and decompress files. For compression it will create the encoded version of the input file by using the ASCII characters for 0 and 1. This means your compressed output will actually be larger than the original. The idea here is to have a working Huffman algorithm without being concerned with the real low-level implementation of it. Your Huffman encoding / decoding solution must include the following methods:1.initializeFromFile(String FileName)Takes the supplied file name and builds Huffman tree using a Priority Queue as discussed during the lectures. It must also print the number of bytes read. It may also use this function to compute and print the character frequency counts.2.encodeFile(String InFile, String OutFile)Takes the supplied file names and encodes the InFile, placing the result in the OutFile. It also must check to make sure initializeFromFile has been executed. It must also print both input and output byte count and compute the size of the ENCODED file as a percentage of the size of the ORIGINAL file (level of compression).3.decodeFile(String InFile, String OutFile)Takes the supplied file names 代写CSI 403留学生作业、代写Huffman encoding algorithm作业、代做C/C++编程作业、代写and decodes the InFile, placing the result in the OutFile. It also checks to make sure initializeFromFile has been executed. It must also print the number of bytes received as well as the number of bytes resulting from the decoding.You are to include the following Code Structure in your solution.int huffmanCode(String args){Huffman T;T.InitializeFromFile(c:\\FileToBeProcessed.txt);T.EncodeFile(c:\\FileToBeProcessed.txt, c:\\FileToBeProcessed.enc);T.DecodeFile(c:\\FileToBeProcessed.enc, c:\\FileToBeProcessed.dec);return 0; }Testing your resultFrom the command line window you are to use fc /b will compare the two files.prompt> fc /b C:\ FileToBeProcessed.txt C:\ FileToBeProcessed.dec should show “no differences found” if both your encoder and decoder work well from end-to-end.You are to use the C++ programming language for this exercise. An additional document providing information regarding the documentation to be submitted for the solution of your assignment will be made available as a separate document.Due DateDue by 11:59 PM, Wednesday, December 5th, 2018.How to Submit your WorkYour solutions must be submitted to the address provided by your co-instructor.Your files for the Project 3 must include the source code for all modules used for the exercise as well as an executable file to allow your solution to be tested. You must include all your source files in a Compressed (zipped) folder (.zip). Your (.zip) folder as well as the subject of your message must follow the format: Project 3 Your Name. Marks will be deducted if you do not follow this requirement.转自:http://ass.3daixie.com/2018112121964220.html

你可能感兴趣的:(讲解:CSI 403、Huffman encoding algorithm、C/C++、C/C++Haskell)