I always use either rsync or scp in order to copy file from/to a remote machine. Recently, I discovered in the manual of scp (man scp) the flag -C -C      Compression enable.  Passes the -C flag to         ssh(1) to enable compression.Before I discovered this flag, I used to zip before and then scp.Is it as efficient to just use the -C than zipping and unzipping? When is using one or another process make the transfer faster?
What does the `-C` flag exactly do in `scp`?
scp;compression;file transfer
It's never really going to make any big difference, but zipping the file before copying it ought to be a little bit less efficient since using a container format such as zip that can encapsulate multiple files (like tar) is unnecessary and it is not possible to stream zip input and output (so you need a temporary file).Using gzip on the other hand, instead of zip ought to be exactly the same since it's what ssh -C does under the hood... except that gzipping yourself is more work than just using ssh -C.