module Sprockets::EncodingUtils

def gzip(str)

Returns a compressed String

str - String data

Public: Use gzip to compress data.
def gzip(str)
  io = StringIO.new
  gz = Zlib::GzipWriter.new(io, Zlib::BEST_COMPRESSION)
  gz.mtime = 1
  gz << str
  gz.finish
  io.string
end