?
Solved

Huffman code

Posted on 1997-07-13
1
Medium Priority
?
288 Views
Last Modified: 2011-10-03
hello,
I'm doing a homework to implement file compression using static Huffman's algorithm.
My question is:the encoding information must be transmitted at the start of the compressed file,since otherwise it will be impossible to decode.How can I do this efficiently?
Any instructions are appreciated.
0
Comment
Question by:bpmf
1 Comment
 
LVL 1

Accepted Solution

by:
TKII earned 100 total points
ID: 1252123
I think you use your program for compressing and decompressing. So what about writing your coding table to the beginning of the compressed file (or the end if you like to). That is simple if your table has a fixed length. When decompressing you read in this table and are able to decompress. BTW: You can write an algorithm that generates the table while (de)compressing. You start up with an empty table and change the table while working (but thats a bit harder to code).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question