Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Huffman code

Posted on 1997-07-13
1
266 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
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

839 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