When transferring files to or from your server, it's always best to compress them to make the transfer slightly smaller, and most importantly guard against corruption during the transfer process.
Any Windows, Linux and Apple computer are able to compress files. There are several different kinds of compression, but we'll focus on the three most common compression file types: .zip, .tar, and .gz. Zip is a compressed archive (for multple files, usually) while tar is used for a single archive of a file. Gzip (.gz) is the compression of a file or multiple files.
You'll find that most files that are compressed on a Linux server are using the suffix ".tar.gz", while PC's will use the ".zip" compression. Windows and Mac computers have the "zip" utility by default, just like your server. So we'll work with that file type.
Once you transfer the file to your server using FTP, or via the cPanel File Manager ((cPanel » Home » Files » File Manager) you can uncompress the file(s) you compressed on your computer, and they'll retain the same directory structure in the location you uncompress.
You can compress a file on your server just like you can from your computer, though it's a little different. There are multiple ways to do this, but we'll focus on SSH and the cPanel File Manager.
Example: zip -r myfiles.zip docs/ myfileone.txt public_html/ knownhostisawesome.txt php.ini
The above command will create a zip file called "myfiles.zip" and then compress the folders "docs" and "public_html", and the files "myfileone.txt, knownhostisawesome.txt, and php.ini".