parameters: (data)
return_statement: return encoded
docstring: data -> gzip encoded data
  
      Encode data using the gzip content encoding as described in RFC 1952
docstring_summary: data -> gzip encoded data
docstring_tokens: data - > gzip encoded data
function: def gzip_encode(data):
      """data -> gzip encoded data
  
      Encode data using the gzip content encoding as described in RFC 1952
      """
      if not gzip:
          raise NotImplementedError
      f = StringIO.StringIO()
      gzf = gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1)
      gzf.write(data)
      gzf.close()
      encoded = f.getvalue()
      f.close()
      return encoded
function_tokens: def gzip_encode ( data ) : if not gzip : raise NotImplementedError f = StringIO . StringIO ( ) gzf = gzip . GzipFile ( mode = "wb" , fileobj = f , compresslevel = 1 ) gzf . write ( data ) gzf . close ( ) encoded = f . getvalue ( ) f . close ( ) return encoded