Inflate and deflate a string
require 'zlib' deflated = Zlib::Deflate.deflate("this is a test.") puts deflated puts Zlib::Inflate.inflate(deflated)