huffmandeco
Decode binary code by Huffman decoding
Description
decodes the numeric Huffman code vector, sig
= huffmandeco(code
,dict
)code
, by using the Huffman
codes described by input code dictionary dict
. Input
dict
is an N-by-2 cell array, where
N is the number of distinct possible symbols in the original signal
that encodes code
. The first column of dict
represents the distinct symbols, and the second column represents the corresponding
codewords. Each codeword is represented as a numeric row vector, and no codeword in
dict
can be the prefix of any other codeword in
dict
. You can generate dict
by using the
huffmandict
function and code
by using the huffmanenco
function. If all symbols in dict
are numeric,
output sig
is a vector. If any symbol in dict
is
alphabetic, sig
is a one-dimensional cell array.
Examples
Input Arguments
Output Arguments
References
[1] Sayood, Khalid. Introduction to Data Compression. 2nd ed. San Francisco: Morgan Kaufmann Publishers, 2000.