Decoding and decompressing with Python