Daniel Berger wrote:
> If we had a pure Ruby version available as a gem on the other hand...
> 
> :)
> 
> Regards,
> 
> Dan

I'm most of the way done, just missing dynamic huffman trees, and more 
interface similarity with zlib. Need to change the specs from zliby 
though as the algorithm I'm using is not identical to zlib and gives 
different (but still valid) results.

For example, zlib's lz77 phase doesn't seem to behave optimally wrt 
repeats:

>> Zlib::Deflate.deflate(0.chr * 10, 9).length
=> 10
>> CZlib::Deflate.deflate(0.chr * 10, 9).length
=> 11
>> CZlib::Inflate.inflate(Zlib::Deflate.deflate(0.chr * 10, 9)) == 0.chr * 10
=> true
>> CZlib::Inflate.inflate(CZlib::Deflate.deflate(0.chr * 10, 9)) == 0.chr * 10
=> true

(using CZlib for inflation there as I've not integrated it with the 
zliby code yet).
-- 
Posted via http://www.ruby-forum.com/.