views:

365

answers:

2

Are there any open-source compression/decomp libraries available for Ruby? Has anyone implemented LZW?

Or, are there any open-source libraries that use a compression component which could conceivably be extracted for independent use?

EDIT -- thanks for the answers! I should have mentioned that what I have to compress are long strings that will only reside in a database (I won't be compressing files). Also, it would be ideal if whatever library could do this had an equivalent implementation in JavaScript for client-side comp/decomp, as this would be for a web app.

+2  A: 

You find a nice list of all shipped libs of ruby under ruby stdlib.

I'd use the zlib library, it's open, it's used everywhere and you'll find libraries for virtually every language!

reto
+2  A: 

http://rubyzip.sourceforge.net/

Mr. Vile