code: def zlib_decompress_to_string(blob):
      
      if PY3K:
          if isinstance(blob, bytes):
              decompressed = zlib.decompress(blob)
          else:
              decompressed = zlib.decompress(bytes(blob, 'utf-8'))
          return decompressed.decode('utf-8')
      return zlib.decompress(blob)
docs: Decompress things to a string in a py2/3 safe fashion
      >>> json_str = '{"test": 1}'
      >>> blob = zlib_compress(json_str)
      >>> got_str = zlib_decompress_to_string(blob)
      >>> got_str == json_str
      True