WHATSNEW
上传用户:ykyjsl
上传日期:2022-01-30
资源大小:145k
文件大小:8k
源码类别:

压缩解压

开发平台:

C/C++

  1. -----------------------------------------------------------------------------
  2. Arith_coder VERSION 3. WHAT'S NEW (January 2000)
  3. Thanks to Tim Wentford (timwentford@hotmail.com), a number of errors in
  4. version 3 have been identified.  The corrections are:
  5. diff stats.c
  6. 219c219
  7. <     while (size < length)
  8. ---
  9. >     while (size < length-1)
  10. 242c242
  11. <     for (i = 0; i < pContext->max_length; i++)
  12. ---
  13. >     for (i = 0; i <= pContext->max_length; i++)
  14. 275c275
  15. <     while (symbol >= pContext->max_length) 
  16. ---
  17. >     while (symbol > pContext->max_length) 
  18. 279c279
  19. <                     pContext->max_length * 2 * sizeof(freq_value));
  20. ---
  21. >                     (2*pContext->max_length+1) * sizeof(freq_value));
  22. 287c287
  23. <         for (i = pContext->max_length; i < 2*pContext->max_length; i++)
  24. ---
  25. >         for (i = pContext->max_length+1; i <= 2*pContext->max_length; i++)
  26. 337c337
  27. <     if ((symbol > 0) && (symbol < pContext->max_length))
  28. ---
  29. >     if ((symbol > 0) && (symbol <= pContext->max_length))
  30. 683c683
  31. <     for (i = 0; i < pContext->initial_size; i++)
  32. ---
  33. >     for (i = 0; i <= pContext->initial_size; i++)
  34. diff hashtable.c
  35. 95d94
  36. <     pTable->pStrings->length = 0;
  37. 130,131d128
  38. <       pNew->pBuckets->nBits = 0;
  39. <         pNew->pBuckets->nWords = 0;
  40. File arith_coder-3.tar.gz contains the revisions; but the corresponding
  41. changes to the Fenwick tree structure in the stats.c file in
  42. arith_coder-2.tar.gz have not been made.  My machine obviously zeroes
  43. memory when it is allocated!
  44. -----------------------------------------------------------------------------
  45. Arith_coder VERSION 3. WHAT'S NEW (February 1999)
  46. 1. File stats.c now implements the "Moffat tree" data structure, as
  47. opposed to the "Fenwick tree" data structure. For a description, see
  48. http://www.cs.mu.oz.au/~alistair/abstracts/mof99:spe.html. The revised
  49. data structure operates at about the same speed in char, but allows
  50. word to operate slightly faster. In extreme cases (test this with uint)
  51. of decreasing probability distributions, the new structure might be
  52. considerably faster.
  53. 2. An additional "uint" model (in addition to bits, char, and word) has
  54. been included, which reads unsigned integers as coding symbols.  Note
  55. that each integer in the stream must be in the range 1..r+1, where r is
  56. the largest integer  in the stream to date. Hence, the first integer
  57. must always be 1.
  58. 3. For up-to-date details, see http://www.cs.mu.oz.au/~alistair/arith_coder/
  59. -----------------------------------------------------------------------------
  60. -------------------------------------------------------------------
  61. Word, Character, and Bit Based Compression Using Arithmetic Coding.
  62. -------------------------------------------------------------------
  63. ** MINOR FIX October 1996: Setting Max_frequency in create_binary_context()
  64.      ensures binary coding now works correctly when B and F are variable.
  65.      (MOST_PROB_AT_END now also defined by default in stats.c)
  66. -----------------------------------------------------------------------------
  67. Arith_coder VERSION 2. WHAT'S NEW (August 1996)
  68. Changes from original release:
  69. -----------------------------------------------------------------------------
  70. The programs char, bits, and word have been replaced by a single program,
  71. arith_coder.  Char, bits and word are now symbolic links to arith_coder.
  72. -----------------------------------------------------------------------------
  73. CHANGES TO DATASTREAM:
  74. Bytes are filled bitwise starting with most significant bit.  (Opposite of
  75. previous version).
  76. The range is now initially Half, instead of Half-1, and renormalisation is
  77. done when range <= Quarter instead of < Quarter.  This may alter the data
  78. stream.
  79. Finish_encode() now outputs B_bits (previously 3), so that these can be
  80. safely read into the buffer, without reading past eof or the start of different
  81. data.  (There is a FRUGAL_BITS option which can be defined, and only
  82. outputs 1, 2 or 3 bits, and the decoder recovers the extra bits read in, if
  83. required).
  84. HEADER FORMATS:
  85. Headers now include B_bits (formerly called code_bits) and a version string.
  86. Char: 10 bytes
  87. +============+===========+===========+==========+
  88. | Magic Num  |  Version  |  F_bits   |  B_bits  |
  89. | 4 bytes    |  4 bytes  |  1 byte   |  1 byte  |
  90. +============+===========+===========+==========+
  91. Word: 11 bytes
  92. +============+===========+===========+==========+==========+
  93. | Magic Num  |  Version  |  F_bits   |  B_bits  | mbytes   |
  94. | 4 bytes    |  4 bytes  |  1 byte   |  1 byte  | 1 byte   |
  95. +============+===========+===========+==========+==========+
  96. Bits: 12 bytes
  97. +============+===========+===========+==========+==========+==============+
  98. | Magic Num  |  Version  |  F_bits   |  B_bits  | mbytes   | bits_context |
  99. | 4 bytes    |  4 bytes  |  1 byte   |  1 byte  | 1 byte   | 1 byte       |
  100. +============+===========+===========+==========+==========+==============+
  101. -----------------------------------------------------------------------------
  102. CHANGES IN FUNCTIONALITY:
  103. The value B (B_bits, formerly called code_bits) may be specified from
  104. the command line with the -b option (if not fixed at compile time).
  105. The stats module maintains the most probable symbol at the end of the
  106. range which improves compression, and can also improve stats decoding
  107. speed (as it doesn't look up the Fenwick structure if the mps is received).
  108. Bits_outstanding and L are no longer maintained by the decoder (for improved
  109. performance).  This means it is theoretically possible for bits_outstanding
  110. to overflow when encoding, requiring the program to halt  (see notes in
  111. the code or the paper).  This means B_bits are output by finish_encode()
  112. instead of 1,2 or 3, so that the decoder can resync (because V is not
  113. maintained).
  114. End of file is checked for while reading input.
  115. -----------------------------------------------------------------------------
  116. SPEED OPTIMISATIONS:
  117. Coder:
  118.   Decoder uses a transformation D=V-L to greatly simplify renormalisation
  119.   loop.
  120.   Both F_bits and B_bits can be fixed at compile time for a performance
  121.   improvement (they are fixed by default unless compiled with -DVARY_NBITS).
  122.   The shift/add loops are now explicitly unrolled with macros if B_bits and
  123.   F_bits are known at compile time.
  124.   Redundant calculation of "r" in binary_arithmetic_{encode,decode} removed
  125.   (although compiler may optimise it out).
  126. Stats module:
  127.   When decoding a symbol, the "low" frequency value is determined when the
  128.   symbol is determined.  This is now exploited to help work out the "high"
  129.   value, rather than recalculating both from scratch.
  130. Bit i/o:
  131.   Different method for ADD_NEXT_INPUT_BIT may result in a slight
  132.   speed up.  
  133. -----------------------------------------------------------------------------
  134. OTHER CHANGES:
  135. Arithmetic coding module has been renamed from coder.c to arith.c.
  136. Input and output has been separated into files bitio.{h,c}.
  137. The program arith_coder has subsumed char, bits, and word, with arith_coder.c
  138. processing the command line and keeping track of memory usage.
  139. Stats.c:
  140. The zero frequency probability is now kept track of in a function and
  141. macro, for easy change of estimation method.
  142. The first item in the Fenwick structure (item 1) is now reserved for the
  143. zero frequency probability, even if it is zero.  This means it is effectively
  144. treated as any other symbol.
  145. FRUGAL_BITS coder option:
  146. Removes some of the speedup of the improved DECODE_RENORMALISE loop, but
  147. outputs the same number of bits as the previous version (approximately
  148. B_bits less per finish_encode(), and is still able to resync (with
  149. finish_encode(); start_encode(); pairs).
  150. Magic numbers now have a non-ascii character (377) in them so the file
  151. will not be mistaken for ascii text.
  152. The types for code values, frequency values and division values (which
  153. store code/frequency) are all now typedef'd.  (See arith.h: code_value,
  154. freq_value and div_value)
  155. Bits.c:  Return value is checked when allocating memory for context zero.
  156. Compression rate when decoding is calculated and displayed.
  157. Peak memory usage is displayed instead of memory usage at end of coding
  158. (which may have been after a memory purge)
  159. When run with no parameters, a summary of commands and options are displayed.
  160. -----------------------------------------------------------------------------