There's a need where one cannot transfer Huffman coding table with other. Is there a possibility of not having Huffman table but still decode the message at recipient side?
Asked
Active
Viewed 148 times
-1
-
1So you have an encoded message, but not the Huffman encoding? Is there *anything* you know about the message? Like, is the message an English song text, or is it a French poem, or is it a legal text in Greek? Or is it certain that a certain word occurs in it? Or ...anything? – trincot Jun 21 '20 at 17:12
-
It's English alphanumeric characters. ~100 bits in size. – NIGHT077 Jun 22 '20 at 05:36
-
If that is all you know, then it is not possible. You need to use a different compression algorithm. – trincot Jun 22 '20 at 09:11
-
Not true, for example he could build a Huffman tree based on a typical distribution of characters and share that between the sender and the receiver (but without sending it back and forth). This canonical tree would obviously need to include all possible characters that could occur in a message. In terms of compression of the message itself this would be inferior to using a tree based on the actual character distribution of the message, but if messages are short, as appears to be the case here, he may still come out ahead. – 500 - Internal Server Error Jun 22 '20 at 10:05
-
It's hexadecimal and ~100 bits in size – NIGHT077 Jun 23 '20 at 01:58
1 Answers
1
No.
The recipient can generate multiple Huffman tables and decode the message with each of them, getting different decoded messages. You cannot know which of them is the correct original message.

anatolyg
- 26,506
- 9
- 60
- 134
-
Is there some algorithm that when somebody encode message from one side and other end can decode without any refering to anything. Say a text: "abcaqwbac". This text has repeated characters, but in different positions. Can I compress this like Run-time encoding? Can any other encoding scheme can help? AFAIK, run-time encoding is for characters sitting at near positions. – NIGHT077 Jun 21 '20 at 08:06
-
1Oh, I get it! You are trying to improve an existing Huffman compression algorithm by deleting the Huffman table! If so, the LZW algorithm does exactly that. – anatolyg Jun 21 '20 at 22:26