A convenient wrapper for the zlib standard library that allows compression/decompression of strings with gzip.
Compresses a string using gzip.
# File lib/active_support/gzip.rb, line 22 22: def self.compress(source) 23: output = Stream.new 24: gz = Zlib::GzipWriter.new(output) 25: gz.write(source) 26: gz.close 27: output.string 28: end
Decompresses a gzipped string.
# File lib/active_support/gzip.rb, line 17 17: def self.decompress(source) 18: Zlib::GzipReader.new(StringIO.new(source)).read 19: end
Disabled; run with --debug to generate this.
[Validate]
Generated with the Darkfish Rdoc Generator 1.1.6.