📄 whatsnew
字号:
-----------------------------------------------------------------------------Arith_coder VERSION 3. WHAT'S NEW (January 2000)Thanks to Tim Wentford (timwentford@hotmail.com), a number of errors inversion 3 have been identified. The corrections are:diff stats.c219c219< while (size < length)---> while (size < length-1)242c242< for (i = 0; i < pContext->max_length; i++)---> for (i = 0; i <= pContext->max_length; i++)275c275< while (symbol >= pContext->max_length) ---> while (symbol > pContext->max_length) 279c279< pContext->max_length * 2 * sizeof(freq_value));---> (2*pContext->max_length+1) * sizeof(freq_value));287c287< for (i = pContext->max_length; i < 2*pContext->max_length; i++)---> for (i = pContext->max_length+1; i <= 2*pContext->max_length; i++)337c337< if ((symbol > 0) && (symbol < pContext->max_length))---> if ((symbol > 0) && (symbol <= pContext->max_length))683c683< for (i = 0; i < pContext->initial_size; i++)---> for (i = 0; i <= pContext->initial_size; i++)diff hashtable.c95d94< pTable->pStrings->length = 0;130,131d128< pNew->pBuckets->nBits = 0;< pNew->pBuckets->nWords = 0;File arith_coder-3.tar.gz contains the revisions; but the correspondingchanges to the Fenwick tree structure in the stats.c file inarith_coder-2.tar.gz have not been made. My machine obviously zeroesmemory when it is allocated!-----------------------------------------------------------------------------Arith_coder VERSION 3. WHAT'S NEW (February 1999)1. File stats.c now implements the "Moffat tree" data structure, asopposed to the "Fenwick tree" data structure. For a description, seehttp://www.cs.mu.oz.au/~alistair/abstracts/mof99:spe.html. The reviseddata structure operates at about the same speed in char, but allowsword to operate slightly faster. In extreme cases (test this with uint)of decreasing probability distributions, the new structure might beconsiderably faster.2. An additional "uint" model (in addition to bits, char, and word) hasbeen included, which reads unsigned integers as coding symbols. Notethat each integer in the stream must be in the range 1..r+1, where r isthe largest integer in the stream to date. Hence, the first integermust always be 1.3. For up-to-date details, see http://www.cs.mu.oz.au/~alistair/arith_coder/------------------------------------------------------------------------------------------------------------------------------------------------Word, Character, and Bit Based Compression Using Arithmetic Coding.-------------------------------------------------------------------** MINOR FIX October 1996: Setting Max_frequency in create_binary_context() ensures binary coding now works correctly when B and F are variable. (MOST_PROB_AT_END now also defined by default in stats.c)-----------------------------------------------------------------------------Arith_coder VERSION 2. WHAT'S NEW (August 1996)Changes from original release:-----------------------------------------------------------------------------The programs char, bits, and word have been replaced by a single program,arith_coder. Char, bits and word are now symbolic links to arith_coder.-----------------------------------------------------------------------------CHANGES TO DATASTREAM:Bytes are filled bitwise starting with most significant bit. (Opposite ofprevious version).The range is now initially Half, instead of Half-1, and renormalisation isdone when range <= Quarter instead of < Quarter. This may alter the datastream.Finish_encode() now outputs B_bits (previously 3), so that these can besafely read into the buffer, without reading past eof or the start of differentdata. (There is a FRUGAL_BITS option which can be defined, and onlyoutputs 1, 2 or 3 bits, and the decoder recovers the extra bits read in, ifrequired).HEADER FORMATS:Headers now include B_bits (formerly called code_bits) and a version string.Char: 10 bytes+============+===========+===========+==========+| Magic Num | Version | F_bits | B_bits || 4 bytes | 4 bytes | 1 byte | 1 byte |+============+===========+===========+==========+Word: 11 bytes+============+===========+===========+==========+==========+| Magic Num | Version | F_bits | B_bits | mbytes || 4 bytes | 4 bytes | 1 byte | 1 byte | 1 byte |+============+===========+===========+==========+==========+Bits: 12 bytes+============+===========+===========+==========+==========+==============+| Magic Num | Version | F_bits | B_bits | mbytes | bits_context || 4 bytes | 4 bytes | 1 byte | 1 byte | 1 byte | 1 byte |+============+===========+===========+==========+==========+==============+-----------------------------------------------------------------------------CHANGES IN FUNCTIONALITY:The value B (B_bits, formerly called code_bits) may be specified fromthe command line with the -b option (if not fixed at compile time).The stats module maintains the most probable symbol at the end of therange which improves compression, and can also improve stats decodingspeed (as it doesn't look up the Fenwick structure if the mps is received).Bits_outstanding and L are no longer maintained by the decoder (for improvedperformance). This means it is theoretically possible for bits_outstandingto overflow when encoding, requiring the program to halt (see notes inthe code or the paper). This means B_bits are output by finish_encode()instead of 1,2 or 3, so that the decoder can resync (because V is notmaintained).End of file is checked for while reading input.-----------------------------------------------------------------------------SPEED OPTIMISATIONS:Coder: Decoder uses a transformation D=V-L to greatly simplify renormalisation loop. Both F_bits and B_bits can be fixed at compile time for a performance improvement (they are fixed by default unless compiled with -DVARY_NBITS). The shift/add loops are now explicitly unrolled with macros if B_bits and F_bits are known at compile time. Redundant calculation of "r" in binary_arithmetic_{encode,decode} removed (although compiler may optimise it out).Stats module: When decoding a symbol, the "low" frequency value is determined when the symbol is determined. This is now exploited to help work out the "high" value, rather than recalculating both from scratch.Bit i/o: Different method for ADD_NEXT_INPUT_BIT may result in a slight speed up. -----------------------------------------------------------------------------OTHER CHANGES:Arithmetic coding module has been renamed from coder.c to arith.c.Input and output has been separated into files bitio.{h,c}.The program arith_coder has subsumed char, bits, and word, with arith_coder.cprocessing the command line and keeping track of memory usage.Stats.c:The zero frequency probability is now kept track of in a function andmacro, for easy change of estimation method.The first item in the Fenwick structure (item 1) is now reserved for thezero frequency probability, even if it is zero. This means it is effectivelytreated as any other symbol.FRUGAL_BITS coder option:Removes some of the speedup of the improved DECODE_RENORMALISE loop, butoutputs the same number of bits as the previous version (approximatelyB_bits less per finish_encode(), and is still able to resync (withfinish_encode(); start_encode(); pairs).Magic numbers now have a non-ascii character (\377) in them so the filewill not be mistaken for ascii text.The types for code values, frequency values and division values (whichstore code/frequency) are all now typedef'd. (See arith.h: code_value,freq_value and div_value)Bits.c: Return value is checked when allocating memory for context zero.Compression rate when decoding is calculated and displayed.Peak memory usage is displayed instead of memory usage at end of coding(which may have been after a memory purge)When run with no parameters, a summary of commands and options are displayed.-----------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -