Skip to content

Instantly share code, notes, and snippets.

@zxiest
Created March 30, 2011 18:46
Show Gist options
  • Save zxiest/894990 to your computer and use it in GitHub Desktop.
Save zxiest/894990 to your computer and use it in GitHub Desktop.
def self.deflate(string)
zstream = Zlib::Deflate.new
buf = zstream.deflate(string)
zstream.finish
zstream.close
buf
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment