pseudohttp.rb
# Compress a string using gzip.
Compress a string using gzip.
Compress a string using gzip .
def gzip(plaintext)
      buffer = ""
      out = StringIO.open(buffer, "w")
      z = Zlib::GzipWriter.new(out)
      z.mtime = Time.at(1234567890)
      z.write(plaintext)
      z.close
      buffer.force_encoding("binary") if buffer.respond_to?(:force_encoding)
      return buffer
    end
def gzip ( plaintext ) buffer = "" out = StringIO . open ( buffer , "w" ) z = Zlib :: GzipWriter . new ( out ) z . mtime = Time . at ( 1234567890 ) z . write ( plaintext ) z . close buffer . force_encoding ( "binary" ) if buffer . respond_to? ( :force_encoding ) return buffer end
Compress a string using gzip.
Compress a string using gzip .
plaintext
<not_specific>