tldr/pages/common/gzip.md

24 lines
615 B
Markdown
Raw Normal View History

# 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 uncompressed 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:
2015-10-22 08:31:52 +01:00
`gzip -9 -c {{file.ext}} > compressed-file.ext.gz`