I was very surprised that I couldn’t do this easily in Python, so here is the solution to this:
import zlib # ... ungziped_str = zlib.decompressobj().decompress('x\x9c' + gziped_str)
Wow, PHP does it like this:
$ungziped_str = gzinflate($gziped_str);

I'm a programmer at 
Props! That helped.
Comment