Solved

Huffman code

Posted on 1997-07-13
1
239 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 50 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FILE closing 11 68
How to create empty file in SAS? 3 313
pgpool-II on Ubuntu 14.04... ARGH! 5 806
Difference between struct tm and time_t 5 102
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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now