Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 4
    gzip doesn't work, but zlib-flate does (pdf page content stream). Commented May 16, 2017 at 12:23
  • 1
    inverse operation: cat input.txt | gzip -c | tail -c +9 >compressed.gzbody to remove the first 8 bytes
    – milahu
    Commented Apr 20, 2022 at 16:31
  • Small detail about shell functions: the suggested function uses parenthesis as block delimiter, which causes the unnecessary creation of a subshell. Using curly braces: zlibd() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - "$@" | gzip -dc; } Commented Feb 2, 2023 at 15:51
  • 2
    TFW you find a great answer, see yourself quoted in the answer, but can't find the comment that you were quoted from anywhere...
    – D0SBoots
    Commented Jul 9, 2023 at 9:23