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 zcat nor uncompress work: $ cat /tmp/data | gzip -d - gzip: stdin: n
![How to uncompress zlib data in UNIX?](https://cdn-ak-scissors.b.st-hatena.com/image/square/b464c2cda694ab68f456c208dff3f30700a47c13/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Funix%2FImg%2Fapple-touch-icon%402.png%3Fv%3D32fb07f7ce26)