Statistical methods的除了huffman外的另一种常见压缩方式。

Huffman coding的非连续数值特性成为了无法达到香农极限的先天无法弥补的缺陷,但Arithmetic coding给出了better solution。

当然,最好的东西往往伴随着各种专利。


2012年之后,貌似可以有一部分可以用了呢。

Encoding:

每个字符分配一个Range,size就是其比例(Probability)。

Algorithm:

Set low  to 0.0
Set high to 1.0 While there are still input symbols do
get an input symbol
  code_range = high - low.
  high = low + range*high_range(symbol)
  low = low + range*low_range (symbol)
End of While
output low or a number within the range

Decoding:

第四行:0.72167752, Low:0.6, High:0.8, 那么,下一个char会是什么?

range=0.8-0.6=0.2

encoded number = (0.72167752-0.6)/0.20.6083876 --> L

Algorithm:

get encoded number
Do
  find symbol whose range straddles the encoded number
  output the symbol
  range = symbol high value - symbol low value
  subtract symbol low value from encoded number
  divide encoded number by range
until no more symbols

优化技巧:

其实,0.45即能解码成功。

大大地提高了压缩率。

Bzip2 and JPG use Huffman as AC protected by patents
PackJPG using AC shows 25% of size saving

关于专利:

U.S. Patent 4,122,440 — (IBM) Filed 4 March 77, Granted 24 October 78 (Now expired)
U.S. Patent 4,286,256 — (IBM) Granted 25 August 81 (Now expired)
U.S. Patent 4,467,317 — (IBM) Granted 21 August 84 (Now expired)
U.S. Patent 4,652,856 — (IBM) Granted 4 February 86 (Now expired)
U.S. Patent 4,891,643 — (IBM) Filed 15 September 86, granted 2 January 90 (Now expired)
U.S. Patent 4,905,297 — (IBM) Filed 18 November 88, granted 27 February 90 (Now expired)
U.S. Patent 4,933,883 — (IBM) Filed 3 May 88, granted 12 June 90 (Now expired)
U.S. Patent 4,935,882 — (IBM) Filed 20 July 88, granted 19 June 90 (Now expired)
U.S. Patent 4,989,000 — Filed 19 June 89, granted 29 January 91 (Now expired)
U.S. Patent 5,099,440 — (IBM) Filed 5 January 90, granted 24 March 92 (Now expired)
U.S. Patent 5,272,478 — (Ricoh) Filed 17 August 92, granted 21 December 93 (Now expired)

最新文章

  1. 《你不知道的JavaScript》整理(三)——对象
  2. Interview
  3. 还是畅通工程(MST)
  4. hibernate--HQL语法与详细解释
  5. 自己写的中间层..基于通讯组件 RTC
  6. 转载:【译】Android: 自定义View
  7. 利用 Composer 完善自己的 PHP 框架(一)——视图装载
  8. Amoeba实现mysql主从读写分离
  9. wchar_t*和char*之间的互相转换的那些事
  10. Objective-C Runtime 运行时之六:拾遗(转载)
  11. PuTsangTo
  12. 选择排序的3种语言实现方法(C java python)
  13. Libevent 反应堆的初始化
  14. Spring Boot 2.0 WebFlux 教程 (一) | 入门篇
  15. (二)surging 微服务框架使用系列之surging 的准备工作consul安装
  16. DAY11、函数总结
  17. 注入技术--LSP劫持注入
  18. SSM+shiro及相关插件的整合maven所有依赖,详细注释版,自用,持续更新
  19. Codeforces Round #437 B. Save the problem!
  20. 深入理解docker信号机制以及dumb-init的使用

热门文章

  1. js获取本机id
  2. FDMEMTABLE将修改后的数据序列为JSON
  3. SpringMVC拦截器详解
  4. Java线程池 / Executor / Callable / Future
  5. git的使用笔记
  6. openjudge noi 鸡尾酒疗法
  7. 谈谈MySQL死锁之二 死锁检测和处理源码分析
  8. Redis集群搭建(转自一菲聪天的“Windows下搭建Redis集群”)
  9. android下使用tcpdump抓包
  10. MySQL的reset slave与reset slave all