Huffman Coding with norm2huff and huff2norm function
이전 댓글 표시
I have an 8000 information signal and then it is compressed using huffman coding (norm2huff) and then the signal is transmitted over the rayleigh channel. And during the decompression process using the huff2norm function, the number of information signals increases to 8932. Can you explain why that happened? Thanks before
[zipped,info] = norm2huff(quantized_sound); %compress
unzipped = huff2norm(uint8(decoded),info); %de-compress
댓글 수: 10
Walter Roberson
2019년 8월 14일
What kind of error detection and correction is done on the Rayleigh channel?
Ibnu Darajat
2019년 8월 14일
Walter Roberson
2019년 8월 14일
Huffman coding can only be used when the channel is perfect after error detection and correction, unless you introduce synchronization points in the stream that act to restrict error propagation (in which case a portion of the output might be wrong, but then you recover and start outputing correct data again.)
Ibnu Darajat
2019년 8월 14일
Walter Roberson
2019년 8월 14일
Imagine that you have a huffman dictionary:
01 -> Darajat
00 -> wins!
1 -> Ibnu
Now let us imagine that you have the "message" Darjat to send. That gets encoded as 01 . Now let that 01 get transmitted, but let there be a bit error on the 01 such that what is received after detection and correction is 11 . Decode that bit stream according to the dictionary. You start from the beginning of the stream and see that you have a 1 in hand. Match that to the dictionary. Temporarily eliminate all of the items in the dictionary that start with 0, and retain the rest and discard the leading 1 bit. That gives you the dictionary that contains only (empty) -> Ibnu . Are you at a dictionary with a single empty entry? Yes you are -- emit the corresponding string and restore the full dictionary, so you emit Ibnu and continue on to the second 1 out of the 11 that the receiver got. Some decoding logic again, so the 1 matches and again you emit Ibnu . So now you have emitted Ibnu Ibnu -- two items where you only expected one item, Darajat
If you have even a single bit error in a huffman sequence, then everything after that can get messed up in decoding and the number of items emitted can be quite different than if you did not have the error.
Ibnu Darajat
2019년 8월 15일
Ibnu Darajat
2019년 8월 15일
Walter Roberson
2019년 8월 15일
I am not sure what you mean by the average length of the function?
Ibnu Darajat
2019년 8월 15일
Walter Roberson
2019년 8월 15일
Sum of (probability times length of encoding) , where probability is fraction of occurrences in the original source.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!