Huffman encoder

encodes input signal `enco`

= huffmanenco(`sig`

,`dict`

)`sig`

using the Huffman codes described by input
code dictionary `dict`

. `sig`

can have the form of a
numeric vector, numeric cell array, or alphanumeric cell array. If `sig`

is a cell array, it must be either a row or a column. `dict`

is an N-by-2
cell array, where *N* is the number of distinct possible symbols to be
encoded. 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`

using the `huffmandict`

function.

[1] Sayood, Khalid. *Introduction to Data
Compression*. 2nd ed. San Francisco: Morgan Kaufmann Publishers,
2000.