Huffman again!
Hi there,
I have done the implementation of huffman code but i have a difficulty compressing .exe files:
1.The uncompressed file is different than the original file and thus doesn't work properly.(The size of the files are the same, just they function differently.)
2.The compression is not actually a compression since the size of the file not only does not decrease (in exe files or large file in general) but also gets bigger.
I want to know has anybody in this forum done and implementation of this coding method?if so please give your resaults and the compression ratio.
regards,
Capitan Haddock
> Hi there,
> I have done the implementation of huffman code but i
> have a difficulty compressing .exe files:
> 1.The uncompressed file is different than the
> original file and thus doesn't work properly.(The
> size of the files are the same, just they function
> differently.)
Ok, so you got some problems with your encoding or decoding. Run the program on some small data (just a few bytes) which you can verify by hand.
> 2.The compression is not actually a compression since
> the size of the file not only does not decrease (in
> exe files or large file in general) but also gets
> bigger.
What? You definately got some big problems.
> I want to know has anybody in this forum done and
> implementation of this coding method?if so please
> give your resaults and the compression ratio.
I wrote one in C++, but that was more than 10 years ago, so I can't remember, but it was usually pretty good, but it depends on the data.
Kaj