Creating and working with compressed files in FreeBSD server is an easy task.
to compress a file you can use
#gzip filename
to compress each file in a directory,each file will be compressed in one file.
#gzip -r directory-name
to compress all files in a single archive:
#tar -zcvf archive-name.gz directory-name.
to uncompress an archive:
#tar -zxvf archive-name.gz -C /directory-name
also to uncompress an archive:
#gzip -d archive.gz
to uncompress each file in a directory use
#gzip -d folder-name