Table of Contents

NAME

chnhuffmanencode - Huffman encoding of a channel

SYNOPSIS

chnhuffmanencode [-s] [-vo] [-d vector_dimension] channel bitstream huffman_table

OPTIONS

-s
Silent mode (no printed output).
-vo
Print only the value of the rate to stdout (terse output).
-d vector_dimension
Print rate in terms of bits per vector component rather than bits per channel symbol.

DESCRIPTION

chnhuffmanencode implements Huffman coding of the channel sequence, channel (CHN format). chnhuffmanencode calls QccENTHUffmanEncodeChannel(3) , which designs the Huffman code table (based upon the observed probability of occurrence of symbols in the channel), encodes the channel symbols, and outputs binary Huffman codewords to the output bitstream. chnhuffmanencode outputs the Huffman code designed for the channel to huffman_table.

chnhuffmanencode initially outputs a few bytes of header information (original number of symbols in channel, symbol alphabet size, and huffman-coding order) to bitstream. The byte-packed bitstream produced by the Huffman coding follows.

Normally, chnarithemticencode prints to stdout the rate achieved by the Huffman coding, expressed in terms of bits per channel symbol. This output may be suppressed by the -s option (silent mode). The -vo option indicates that only the value of the rate is to be printed (terse output). The -s option overrides the -vo option. If option -d is given, the rate is printed as bits per vector component (i.e., it is the bit rate of the Huffman coding divided by vector_dimension). For example, the -d option gives a convenient way to calculate the bit rate, in bits per original source symbol, when the channel corresponds to indices output from a vector quantizer (see vqencode(1) ). Note: the specification of the -d option in no way affects the operation of the Huffman encoder; it affects only the printed output of the rate.

NOTES

chnhuffmanencode removes all null channel symbols from the channel with a call to QccChannelRemoveNullSymbols(3) prior to Huffman coding.

SEE ALSO

chnhuffmandecode(1) , QccENTHuffmanEncodeChannel(3) , QccENTHuffmanDecodeChannel(3) , QccChannelRemoveNullSymbols(3) , chnentropy(1) , vqencode(1) , QccENTHuffmanTable(3) , QccPackENT(3) , QccPack(3)

D. A. Huffman, "A Method for the Construction of Minimum-Redundancy Codes," Proceedings of the IRE, vol. 40, pp. 1098-1101, September 1952.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads