Forum Moderators: phranque

Message Too Old, No Replies

Data compression using Huffman coding

         

ukgimp

12:07 pm on Feb 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<added>I have a feeling this is not the best forum, sorry folks</added>

Hello

Whilst trying to get my head around Huffman coding as a means of data compression I have come to the conclusion that I need to ask a few questions that I would like to pose.

If I have symbols a-g and each has a probability of (0.05, 0.05, 0.1, 0.2, 0.3, 0.2, 0.1) respectively. Is it possible to get more than one Huffman tree? I ask as I think there are different bit wise values that can be assigned?

e.g

coding 1
a:0000
b:0001
c:001
d:01
e:10
f:110
g:111

coding 2
a:0000
b:0001
c:100
d:101
e:11
f:01
g:001

It looks like the values have been switched, but will that affect performance?

I suppose the bottom line is, is there more than one way to encode a set of data?

Cheers