Gzip is an implementation of the Lempel-Ziv coding algorithm, it compresses files. The Mac OS X implementation of gzip varies a little from their *nix counterparts and it's a little tricky to use so I made this little guide to help myself. If I messed something up, please fork it and fix it!.
The most basic command will compress the file filename.ext
and then replace it with filename.ext.gz
in the same directory.
gzip filename.ext
If you don't want to lose your original file, then you need to pipe the output of gzip -c
to a file.