compression of source and target files

Matt McCutchen hashproduct+rsync at
Sun Sep 23 14:34:30 GMT 2007

On 9/23/07, devzero at <devzero at> wrote:
> i can transfer remote files to a local dir and they are being compressed on the
> local side

Good, so it basically works.

> +Use of --dest-filter automatically enables --whole-file.

I suppose the patch could be changed to allow delta transfers with
--dest-filter, but using a filtered destination file as the basis
would generally be ineffective.  There should be a --basis-filter
option to specify a filter that is run on the destination file to
convert it back to a form likely to match the source file.

> i tried "--checksum" but it didn`t work as expected.

For the same reason that size checking didn't work.

> maybe even size/content-checking
> can be implemented by just making sure rsync takes the uncompressed
> size for comparison. this will use much cpu, though....

To generalize that, rsync could run the --basis-filter on the
destination file and use the size of the output for the quick check.
This works only if the filter is perfectly reversible; gzip is (we
hope!), but others might not be.  To handle irreversible filters,
there would need to be a state file on either source or destination
giving the source sizes corresponding to the current destination
files, and somehow file transfers would have to be skipped based on
the state file.


More information about the rsync mailing list