tldr/common/gzip.md
Peter Tripp e4118b1585 A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler

Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 12:36:05 -08:00

607 B

gzip

Compress/uncompress files with gzip compression (LZ77)

  • compress a file, replacing it with a gzipped compressed version

`gzip {{file.ext}}

  • decompress a file, replacing it with the original uncomrpessed version

`gzip -d {{file.ext.gz}}

  • compress a file specifying the output filename

`gzip -c {{file.ext}} > compressed-file.ext.gz

  • uncompress a gzipped file specifying the output filename

`gzip -c -d {{file.ext.gz}} > uncompressed-file.ext

  • specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is 6

gzip -9 -c {{file.ext}} > compressed-file.ext.gz