Rsync –compress-level: which compression levels can be used

compressionrsync

Rsync has command line arguments for compression:

-z, --compress              compress file data during the transfer
    --compress-level=NUM    explicitly set compression level

What does --compress-level mean? Which numbers can be used as level?

Best Answer

it's values between 0-9. Where 1 is fastest 9 is most compressed. Other than that there's correlation between rsync and zlib where about rsync tells the zlib library to "use the default compression", in zlib's docs, it says this:

Z_DEFAULT_COMPRESSION requests a default compromise between speed and compression (currently equivalent to level 6).

Related Topic