On Mon, 19 Mar 2001, Dave Thomas wrote:

> 
> I want to implement a compression scheme for some text, and I want to
> implement it in pure Ruby.
> 
> I hacked up a simple LZW compressor (it was about 6 lines of Ruby) and 
> it works fine, but I believe that the Unisys patent prevents the use
> of this in commercial applications. I tried basic RLE and Huffman, but 
> the compression wasn't too good.
> 
> So could anyone recommend a scheme that's free for use, and which can
> be realistically decompressed in a handful of lines of Ruby?
> 
If you haven't checked this page out you might find something useful
there:

http://www.dogma.net/DataCompression/SourceCode.shtml

The Burrows-Wheeler transform would be one interesting candidate. I'm not
sure how short you can do it though since I haven't looked into it
myself. Please mail to the list if you implement since I'd be interested
in the code.

Regards,

Robert