Scilab Function
Last update : 06/02/2007

huffcode - huffman coding of a sequence

Calling Sequence

[QT,QM]=huffcode(A)

Parameters

Description

The function converts the scalar input sequence (vector or matrix) into a compressed bit sequence. The bit sequence is represented by a string containing 1s and 0s.

huffcode requires the function "fasthist" and "huffman". The reverse operation is performed by the scilab function "huffdeco".

Examples

// Generate a Testmatrix
A=testmatrix('frk',10)+1;
A=A(:).';
[QT,QM]=huffcode(A);
disp('compressed Bit sequence:');
disp(QT);
disp('Code Table:');
disp(QM);
// End of Demo

See Also

fasthist ,   huffman ,   huffdeco ,  

Authors

Dr. Andreas Geissler geisslea@web.de