📄 arith_coder.1
字号:
.PU.TH arith_coder 1 local "Rev: 3.0".SH NAMEarith_coder, bits, char, uint, word \- data compression using arithmeticcoding and a bit, character, unsigned integer, or word based model.SH SYNOPSIS.ll +8.B bits [\fB\-h\fR][\fB\-v\fR][\fB\-e\fR[\fB\-m\fR \fImbytes\fP][\fB\-b\fR \fIcodebits\fP][\fB\-f\fR \fIfbits\fP][\fB\-c\fR \fIctxbits\fP]]|[\fB\-d\fR][\fIfname\fP].B char[\fB\-h\fR][\fB\-v\fR][\fB\-e\fR[\fB\-b\fR \fIcodebits\fP][\fB\-f\fR \fIfbits\fP]]|[\fB-d\fR][\fIfname\fP].B uint[\fB\-h\fR][\fB\-v\fR][\fB\-e\fR[\fB\-b\fR \fIcodebits\fP][\fB\-f\fR \fIfbits\fP]]|[\fB-d\fR][\fIfname\fP].B word[\fB\-h\fR][\fB\-v\fR][\fB\-e\fR[\fB\-m\fR \fImbytes\fP][\fB\-b\fR \fIcodebits\fP][\fB\-f\fR \fIfbits\fP]]|[\fB\-d\fR][\fIfname\fP].B arith_coder[\fB\-h\fR][\fB\-v\fR][\fB\-e\fR[\fB\-t\fR \fImodel\fP][\fB\-m\fR \fImbytes\fP][\fB\-b\fR \fIcodebits\fP][\fB\-f\fR \fIfbits\fP][\fB\-c\fR \fIctxbits\fP]]|[\fB\-d\fR][\fIfname\fP].ll -8.SH DESCRIPTION.I Bits, char, uint, and.I wordare programs that use arithmetic coding for compressing data, usingbit, character, unsigned integer, and word based models, respectively.They are links to.I arith_coder,which can also be called directly with.B \-t.I modelspecified to be "bits", "char", "uint", or "word"..I Bits uses an adaptive fixed order bit based model.The model encodes eachbit of the input using probabilities conditioned by the previous .I ctxbitsbits of the file.The program potentially allocates up to 2^\fIctxbits\fR contexts requiring16 bytes each. If the memory limit is exceeded when allocating new contexts,existing contexts are re-used..I Charuses an adaptive zero-order character based model.Itis provided for comparison with the original CACM arithmetic codingpackage, but is unlikely to provide compression as good as.I bitsor.I word..I Uintuses an adaptive zero-order unsigned-integer based model which is initialisedwith a single escape symbol.Message symbols are read using the.I fwritefunction.The input symbols are expected to occur for the first time in numerical order.This removes the need to store the actual integer causing an escape symbol to be transmitted: it is simply the next integer in sequence.This restriction imples that the first integer in the file must 1..I Worduses an adaptive zero-order word based model. If the memory limit is reached, all words are purged from memory, andcollection of words is started from scratch.Binary files (for example,bit-map images) will be handled correctly, but compression is unlikely to be asgood as the rates obtained by tailor-made compression regimes.The specified uncompressed file .I fnameis compressed to standard output if.B \-eis specified. Similarly, a compressed file.I fnameis decompressed to standard output if.B \-dis specified.If no.I fnameis given, input is read from stdin.The level of compression obtained depends upon the size of the file, and theamount of redundancy. The program uses an arithmetic coding scheme which uses frequency counts of 2^\fIfbits\fR.There is a constraint that \fIfbits\fR <= \fIcodebits\fR-2, where \fIcodebits\fR is thenumber of bits of precision for arithmetic in the arithmetic coding module.So, for example, if \fIcodebits\fR is 32 then \fIfbits\fR could be at most 30..ll -8.SH OPTIONS .TP\f4\-h\fPDisplay help (lists valid command line parameters)..TP\f4\-e\fPSelect compression..TP\f4\-d\fPSelect decompression. The appropriate model isselected automatically, based on the magic number at the start ofthe compressed file..TP\f4\-v\fPVerbose mode. Display details about compression performance.If this flag is the only option on the command line, displays thecommand line options, as well as information about the compile timecharacteristics of the program (whether shift/add or multiplication/divisionarithmetic is being used, etc)..TP\f4\-t\fPSpecify \fImodel\fR to encode data. Can be one of "bits", "char" or "word"..TP\f4\-m\fPLimit memory usage (for data structures) to.I mbytesmegabytes.Default value is 1. (Bit and word based models only)..TP\f4\-b\fPUse.I codebitsbits for arithmetic done in arithmetic coding. Default is 32, and isbounded by the size of the data type used to store code values(typedef code_value in arith.h)..TP\f4\-f\fPUse.I fbitsbits for frequency counts. Larger values allowmore accurate modelling of large files andfaster compression and decompression ifcompiled with shift/add arithmetic (the MULT_DIV option is not specifiedin the Makefile).However larger values of.I fbitsrelative to.I codebitsmay also reduce overall compression efficiency.This is because oftruncation effects at the coding stage, and because of the recencyeffect that is a by-product of count scaling is reduced..I Fbitsmust be at least 2 less than.I codebits.Default is 27..TP\f4\-c\fPUse.I ctxbitsprevious bitsas a context for each compressed bit. Larger valuesprovide more accurate modelling and better compression.Note, however, that in the absence of any memory limitmemory use is proportional to 2^\fIctxbits\fP.Default is 16. (Bit based model only). .SH BUGS.LPCompressed files with the "word" and "bits" models may not be portable acrossarchitectures. This may be the case if there are differentalignment restrictions or the size of type freq_value(currently declared as "int") is different.This is due to memory limits being reached at different stages..SH REFERENCE.I Arithmetic Coding Revisited,Alistair Moffat, Radford Neal, Ian H. Witten,ACM Transactions on Information Systems,16(3):256-294, July 1998;and.I An improved data structure for cumulative probability tables;Alistair Moffat,Software-Practice & Experience,1999.See also .I http://www.cs.mu.oz.au/~alistair/abstracts/..SH CONDITIONSThese programs are supplied free of charge for research purposes only,and may not sold or incorporated into any commercial product. There isABSOLUTELY NO WARRANTY of any sort, nor any undertaking that they arefit for ANY PURPOSE WHATSOEVER. Use them at your own risk. If you dohappen to find a bug, or have modifications to suggest, please reportthe same to Alistair Moffat, alistair@cs.mu.oz.au. The copyrightnotice included in the source codeand this statement of conditions must remain an integralpart of each and every copy made of these files.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -