|Hi, thanks very much for you reply.|
I do have a problem implementing what you suggested though.
If I have say, several characters to encode, then there may be some characters which require more than 3 bits. E.g if i had the code "g"=111110.
if i code that with 111 and 110 where 111=7, and 110=6, then output is 76, taking up 2 bytes. This makes the encoding greater than the 1 byte used for "g" alone.
However, if i encode the that as a whole six bits, then 111110=126. taking 3 bytes, which is still greater than the 1 byte used for 'g' alone?
So it seems that when i try to huffman code input with several different characters, i will get alot of inefficiencies. Is there a way to overcome this?