how to make rsync not uncompressing files?

No, it is not possible. You'll need to compress the data either before or after you transfer it.


Short answer no.

Long answer : From what I understand of http://zlib.net/zlib_faq.html, zlib does not really compress files but chunks of a stream. You can't be sure that a total version of your file exists somewhere in a compressed state (think of sending a 200GB mp3 file : Do you need 190GB free space?).


The main reason why this is not possible is due to the nature of rsync. From the man page:

It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.

Unless this is the first time you are transferring these files, only the changes are being sent. If you could somehow save the data stream, you'd end up with a sort of compressed diff file, which wouldn't be of any particular use.

Compress the files before passing them to rsync.