gzip is a common use compress tool, fast and easy to use.
this will compress and replace filename with filename.gz it is useful when zipping single files like log :
gzip filename
unzip by gzip -d , this will also replace filename.gz with filename :
gzip -d filename.gz
a tricky thing, gzip -r will compress every single file inside directory, not the folder itself :
gzip -r foldername
reference link :