I have created zlib-compressed data in Python, like this:
import zlib s = '...' z = zlib.compress(s) with open('/tmp/data', 'w') as f: f.write(z)
(or one-liner in shell:
echo -n '...' | python2 -c 'import sys,zlib; sys.stdout.write(zlib.compress(sys.stdin.read()))' > /tmp/data)
Now, I want to uncompress the data in shell. Neither
$ cat /tmp/data | gzip -d - gzip: stdin: not in gzip format $ zcat /tmp/data gzip: /tmp/data.gz: not in gzip format $ cat /tmp/data | uncompress - gzip: stdin: not in gzip format
It seems that I have created gzip-like file, but without any headers. Unfortunately I don't see any option to uncompress such raw data in gzip man page, and the zlib package does not contain any executable utility.
Is there a utility to uncompress raw zlib data?