Em Andamento

compression and decompression

This case study is about Huffman code trees what the code will do is file compression and decompression.

>> FINAL Required files: [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view],

[url removed, login to view], [url removed, login to view], [url removed, login to view]

> compress infile outfile

When run, this program will read the contents of the file named by its first command line argument (infile),

construct a Huffman code for the contents of that file, and use that code to construct a compressed version which is written to a file named by the second command line

argument (outfile). The input file can contain any data (not just ASCII characters) so it should be treated as a binary file.

Your compress program must work for input files up to 10 megabytes in size, so a particular byte value may occur up to 10 million times in the file.

The second part :

> uncompress infile outfile

When run, this program will read the contents of the file named by its first command line argument,

which should be a file that has been created by the compress program. It will use the contents of that file to reconstruct the original,

uncompressed version, which is written to a file named by the second command line argument. In particular, for anyfile F,

after running compress F G uncompress G H it must be the case that the contents of F and H are identical.

Break the problem down:

1- compress program basically needs to go through these steps:

Open the input file for reading.

Read bytes from the file, counting the number of occurrences of each byte value; then close the file.

Use these byte counts to construct a Huffman coding tree.

Open the output file for writing.

Write enough information (a "file header") to the output file to enable the coding tree to be reconstructed when the file is read by your uncompress program.

Open the input file for reading, again.

Using the Huffman coding tree, translate each byte from the input file into its code, and append these codes as a sequence of bits to the output file, after the header.

Close the input and output files.

2- uncompress program should go through these basic steps:

Open the input file for reading.

Read the file header at the beginning of the input file, and reconstruct the Huffman coding tree.

Open the output file for writing.

Using the Huffman coding tree, decode the bits from the input file into the appropriate sequence of bytes, writing them to the output file.

Close the input and output files.

our programs must deal with:

Input files that will be MUCH larger than 1KB

Input files that are not restricted to text files (may be binary files)

Writing compressed files that are actually smaller than the input file.

Habilidades: Programação C++

Ver mais: what is binary tree in c, what is binary tree, what are binary trees, use case sequence, trees beginning with h, study programming, programming with cpp, f trees, data trees, data cpp, c# read and write text file, c programming break, cpp data, binary trees in c, binary trees, binary to text, binary problem, binary code tree, beginning programming, argument programming, study coding, huffman code, h and h, decode a file, data compression

Acerca do Empregador:
( 45 comentários ) Los Angeles, United States

ID do Projeto: #5101229

Premiar a:

vano101

A proposal has not yet been provided

$40 USD em 3 dias
(842 Avaliações)
7.1

11 freelancers estão ofertando em média $92 para este trabalho

Alexnick

Hello there! I am proficient in C++ and I am interested in offering a professional solution to your project. I would only like to ask 3 things: - What are the BitInput and BitOutput files supposed to contain? Funct Mais

$39 USD in 3 dias
(20 Comentários)
5.1
Venky117

hi... i can do this. let me know to start immediately. i can deliver you on time. Please ping me ASAP to start. thanks

$155 USD in 3 dias
(23 Comentários)
4.5
ahmedabdallah1

Hello, I'm Ahmed Abdallah a fourth year student at computer and systems engineering department at Alexandria university. I'm a java expert (3+ years of experience). I'm very good at android, C/C++, data structures, a Mais

$100 USD in 12 dias
(9 Comentários)
3.9
pkcoder

Hi. I am qualified programmer and i have 5 year experience in C\C++ and java. I have good knowledge of Analysis of algorthims as well. I have developed almost the same project before so i have a pretty clear idea what Mais

$35 USD in 2 dias
(14 Comentários)
3.9
cliffroot

Hello, i just recently finished realizing huffman encryption in lisp. Actually, I can do the same thing in c++ - this shouldn't be much of a problem, I guess. Thanks.

$94 USD in 3 dias
(4 Comentários)
3.1
fattahaabdul

i have 8+ years of experience. Can we discuss the project. Please initiate a chat with me so that we can discuss the project at a broader level

$54 USD in 10 dias
(1 Comentário)
1.9
drakar

Have done labs like this when was CS student, no problem to implement it once more. No plagiarism or copy/paste from google search result.

$45 USD in 3 dias
(1 Comentário)
1.4
ashishicfai

Thanks for posting the project on Freelancer, the project requirements completely falls under our domain and where this project exactly matches with our technical strengths and our abilities to deliver the work on time Mais

$216 USD in 15 dias
(1 Comentário)
0.0
RBADevelopment

This is a quite simple task for an experienced programmer. The extra thing I can provide compared to most people here is clean, readable code. If you're interested, I can start tomorrow.

$80 USD in 3 dias
(0 Comentários)
0.0
chetanbhat

Hi I am Chetan Bhat. I am an Engineer under Vishvesvaraya Technological University. I graduated in 2004 in Electronics & Communication. 1)I achieved first class in my graduation. 2)I was employed at Infosys Techn Mais

$155 USD in 3 dias
(0 Comentários)
0.0