⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qccenthuffmanencode.3

📁 spiht for linux this is used to decod and encode vedio i wich all enjoy
💻 3
字号:
.TH QCCENTHUFFMANENCODE 3 "QCCPACK" "".SH NAMEQccENTHuffmanEncode, QccENTHuffmanDecode \- Huffman encoding and decoding.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccENTHuffmanEncode(QccBitBuffer *" output_buffer ", const int *" symbols ", int " num_symbols ", const QccENTHuffmanTable *" table );.br.BI "int QccENTHuffmanDecode(QccBitBuffer *" input_buffer ", int *" symbols ", int " num_symbols ", const QccENTHuffmanTable *" table );.SH DESCRIPTION.BR QccENTHuffmanEncode()performs Huffman coding of the symbol stream in.IR symbols ,outputting the binary codewords to.IR output_buffer ..I num_symbolsindicates how many symbols are in the symbol stream (which can beas short as one symbol)..I output_buffermust be a.BR QccBitBufferthat has been opened for writing prior to calling.BR QccENTHuffmanEncode() .Finally,.I tablegives the table of Huffman codewords for the alphabet of possiblesymbols..BR QccENTHuffmanDesign (3)can be used to design this table from a probability distributionof the symbols..I tablemust be an encoding table;i.e.,.IR table -> table_typemust be.BR QCCENTHUFFMAN_ENCODETABLE .After calling.BR QccENTHuffmanEncode() ,.BR QccBitBufferFlush (3)must be called to ensure that the last few bits of the bitstream are actually writtento the output file..LP.BR QccENTHuffmanDecode()performs Huffman decoding of the bits in the bitstream.IR input_buffer ,producing a output stream of symbols that are stored in.I symbols .The.I symbols array must be allocated with space sufficient for holding.I num_symbolsintegers; this allocation must be done prior to calling.BR QccENTHuffmanDecode() .Additionally,.I input_buffermust be opened for reading prior to calling.BR QccENTHuffmanDecode() ..SH "NOTES"Multiple successive calls to.BR QccENTHuffmanEncode()are possible; in this case, the individual bitstreams produced by eachencoding appear concatenated in the final output bitstream..BR QccBitBufferFlush (3)must be called after the.I finalcall to.BR QccENTHuffmanEncode()(but not after any of the preceeding calls to.BR QccENTHuffmanEncode() )to ensure that the last few bits of theconcatenated bitstream are actually writtento the output file.Multiple calls to.BR QccENTHuffmanDecode()can be used to decode the concatenated bitstream produced in this fashion,or a single call (with an appropriately larger.IR num_symbolsvalue) will work too..LPThese routines are based upon the implementations of Huffman encoding anddecoding suggested in Annexes C & F of the JPEGstandard, ISO/IEC 10918..SH "RETURN VALUE"These routines return 0 on success, and 1 on failure..LP.BR QccENTHuffmanEncode()will fail if it encounters an invalid symbol (a symbol that isoutside of the permissible range of 0 to .BR QCCENTHUFFMAN_MAXSYMBOL ,or a symbol that does not have a valid codeword assigned to it inthe Huffman table)..LP.BR QccENTHuffmanDecode()will fail if it encounters a bit pattern in the bitstream that doesnot correspond to a valid codeword in the Huffman table..SH "SEE ALSO".BR QccENTHuffmanDesign (3),.BR QccENTHuffmanTable (3),.BR QccPackENT (3),.BR QccPack (3).LPD. A. Huffman, "A Method for the Construction of Minimum-Redundancy Codes,".IR "Proceedings of the IRE" ,vol. 40, pp. 1098-1101, September 1952..LPISO/IEC 10918,.IR "Digital compression and coding of continuous-tone still images" ,1994..SH AUTHORCopyright (C) 1997-2009  James E. Fowler.\"  The programs herein are free software; you can redistribute them an.or.\"  modify them under the terms of the GNU General Public License.\"  as published by the Free Software Foundation; either version 2.\"  of the License, or (at your option) any later version..\"  .\"  These programs are distributed in the hope that they will be useful,.\"  but WITHOUT ANY WARRANTY; without even the implied warranty of.\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the.\"  GNU General Public License for more details..\"  .\"  You should have received a copy of the GNU General Public License.\"  along with these programs; if not, write to the Free Software.\"  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -