gzip – Jay R. Wren – lazy dawg evarlast http://jrwren.wrenfam.com/blog babblings of a computer loving fool Wed, 15 Feb 2017 02:57:57 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.2 zlib stream python oneliner http://jrwren.wrenfam.com/blog/2013/10/07/zlib-stream-python-oneliner/ Mon, 07 Oct 2013 20:18:38 +0000 http://jrwren.wrenfam.com/blog/?p=1096 I ran across a zlib stream, which is like a gzip file, but without the gzip header. I wanted to decompress it and piping through gunzip doesn’t work because of the missing header. Python to the rescue!

| python -c ‘import sys,zlib;print zlib.decompress(sys.stdin.read())’

That was easy.

]]>