This article will walk you through manually compressing a directory with tar on the command line.
You will first need to know the path to the directory you wish to compress, in the following command, this will be represented by '/path/to/directory'. Once you have that information, the following can be used to compresses the directory:
tar -zcvf directory.tar.gz /path/to/directory
This will create a copy of the directory in a compressed format in your current working directory.