You have this error: zlib.error: Error - Step 3 when unpacking: Incorrect header check. Most likely because you are trying to check headers that do not exist, for example: Your data conforms to RFC 1951 (compressed flat format) and not RFC 1950 (compressed zlib format) or RFC 1952 (compressed gzip format).