parameters: (data, max_decode=20971520)
return_statement: return decoded
docstring: gzip encoded data -> unencoded data
  
      Decode data using the gzip content encoding as described in RFC 1952
docstring_summary: gzip encoded data -> unencoded data
docstring_tokens: gzip encoded data - > unencoded data
function: def gzip_decode(data, max_decode=20971520):
      """gzip encoded data -> unencoded data
  
      Decode data using the gzip content encoding as described in RFC 1952
      """
      if not gzip:
          raise NotImplementedError
      f = StringIO.StringIO(data)
      gzf = gzip.GzipFile(mode="rb", fileobj=f)
      try:
          if max_decode < 0: # no limit
              decoded = gzf.read()
          else:
              decoded = gzf.read(max_decode + 1)
      except IOError:
          raise ValueError("invalid data")
      f.close()
      gzf.close()
      if max_decode >= 0 and len(decoded) > max_decode:
          raise ValueError("max gzipped payload length exceeded")
      return decoded
function_tokens: def gzip_decode ( data , max_decode = 20971520 ) : if not gzip : raise NotImplementedError f = StringIO . StringIO ( data ) gzf = gzip . GzipFile ( mode = "rb" , fileobj = f ) try : if max_decode < 0 : # no limit decoded = gzf . read ( ) else : decoded = gzf . read ( max_decode + 1 ) except IOError : raise ValueError ( "invalid data" ) f . close ( ) gzf . close ( ) if max_decode >= 0 and len ( decoded ) > max_decode : raise ValueError ( "max gzipped payload length exceeded" ) return decoded