📄 qccentadaptivegolombencode.3
字号:
.TH QCCENTADAPTIVEGOLOMBENCODE 3 "QCCPACK" "".SH NAMEQccENTAdaptiveGolombEncode, QccENTAdaptiveGolombDecode \- adaptive Golomb (Langdon) encoding and decoding.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "int QccENTAdaptiveGolombEncode(QccBitBuffer *" output_buffer ", const int *" symbols ", int " num_symbols ");.br.BI "int QccENTAdaptiveGolombDecode(QccBitBuffer *" input_buffer ", int *" symbols ", int " num_symbols ");.SH DESCRIPTION.BR QccENTAdaptiveGolombEncode()performs adaptive Golomb (Langdon) 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).Since adaptive Golomb coding is a binary entropy coder,the symbol stream,.IR symbols ,can consist of only zeros and ones..I output_buffermust be a.BR QccBitBufferthat has been opened for writing prior to calling.BR QccENTAdaptiveGolombEncode() .After calling.BR QccENTAdaptiveGolombEncode() ,.BR QccBitBufferFlush (3)must be called to ensure that the last few bits of the bitstream are actually writtento the output file..LP.BR QccENTAdaptiveGolombDecode()performs adaptive Golomb (Langdon) decoding of the bits in the bitstream.IR input_buffer ,producing an output stream of symbols that are stored in.IR 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 QccENTAdaptiveGolombDecode() .Additionally,.I input_buffermust be opened for reading prior to calling.BR QccENTAdaptiveGolombDecode() ..SH "NOTES".BR QccBitBufferFlush (3)must be called after the call to.BR QccENTAdaptiveGolombEncode() to ensure that the last few bits of theconcatenated bitstream are actually written to the output file..LP.BR QccENTAdaptiveGolombEncode() will fail if it encounters an invalid symbol(i.e., a symbol that is neither 0 or 1)..LPGolomb coding originated in the 1966 paper by Golomb; the adaptivevariant described here is due to Langdon.Apparently, this adaptive Golomb coding is also known asrunlength/Rice coding..SH "RETURN VALUE"These routines return 0 on success, and 1 on failure..SH "SEE ALSO".BR QccENTAdaptiveGolombEncodeChannel (3),.BR QccENTAdaptiveGolombDecodeChannel (3),.BR QccPackENT (3),.BR QccPack (3).LPG. G. Langdon, Jr., "An adaptive run-length coding algorithm,".IR "IBM Technical Disclosure Bulletin" ,vol. 26, no. 7B, pp. 3783-3785, December 1983.S. W. Golomb, "Run-Length Encodings,".IR "IEEE Transactions on Information Theory" ,vol. 12, pp. 399-401, July 1966..SH AUTHORWritten by Yufei Yuan <yuanyufei@hotmail.com>Copyright (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 + -