2008 November 14th Friday (十一月 十四日 金曜日)

来源:互联网 发布:精准扶贫数据平台 编辑:程序博客网 时间:2024/04/29 10:48
   I found out a bug in the LZMA SDK for Java.  I don't know whether the author test it.  When I run it after compiled it, Java VM tell me an exception on
out of memory.  I felt so strange.  How much memory a compression tool needs?  After debuging, I found out there is a variable _dictionarySize is initialize
with a so big number -- 2 ^ 22.  My god!  That is why Java can not initialize an integer array with it.

  I cut half of that down.  OK.  The program can run correctly.  I tried making a compression archive, and restored it correctly.

  I can read the source of the LZMA in Java.  By the way, the algorithm implemented in C++ is so hard to read.

原创粉丝点击