[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Huffman code

Posted on 1997-07-13
1
Medium Priority
?
285 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
[X]
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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

649 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