Forum Moderators: phranque
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