How do I compress a directory?
Well, most probably your files are perfectly fine before FTP transmission.
Unfortunately, probably you are transferring your files using wrong FTP mode.
FTP do have two modes: binary and ASCII. By default most clients use ASCII mode, which breaks your binary files completely. I don't know which FTP client you are using, but for example in ncftp you can use command "binary" to switch to binary mode.
If you want to create ZIP files using Ubuntu (or almost any other Linux), use zip
. You can install it to Ubuntu by running
sudo apt-get install zip
Then you can create zip file by running
zip -r compressed_filename.zip foldername
On related note, you should know that FTP is insecure transmission protocol. Consider switching to sftp, for example. There is many free ssh servers for Windows, including minimal OpenSSH port.
Campression can be done using tar, zip, p7 and even rar in ubuntu. You will need to install rar for rar archiving. Simply right clicking gives you the options for compressing with installed archivers.
If you want to use "zip" for .zip extentension you can see manual of zip. The commandline for using tar is:
tar cvzf tarball.tar.gz directory/
Compression of directories, using parallel compression is an efficient way to save time. pbzip2 can help you getting directories compressed.
tar cf <outputfile_name> --use-compress-prog=pbzip2 <directory_name>