--skip-compress option not selectively skipping files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

--skip-compress option not selectively skipping files

Kit Menlove
I've been playing around with the "--skip-compress" option in rsync 3.1.2 and it appears to not selectively skip the compression of files with suffixes in the list.  As a basic example, if I transfer two files, a ".log" file and a ".grb2" file, I get the following results:

no compression
sent 156,412,712 bytes  received 110 bytes  62,565,128.80 bytes/sec
total size is 156,374,300  speedup is 1.00

default compression, no custom skip list
sent 99,482,854 bytes  received 110 bytes  10,471,890.95 bytes/sec
total size is 156,374,300  speedup is 1.57

default compression, "--skip-compress=grb2"
sent 99,482,854 bytes  received 110 bytes  11,703,878.12 bytes/sec
total size is 156,374,300  speedup is 1.57

This tells me that the custom skip list is not successfully skipping the grb2 file compression.  If, on the other hand, I simply rename the log file to be read after the grb2 file, I see the following:

no compression
sent 156,412,731 bytes  received 110 bytes  62,565,136.40 bytes/sec
total size is 156,374,300  speedup is 1.00

default compression, no custom skip list
sent 99,482,869 bytes  received 110 bytes  11,703,879.88 bytes/sec
total size is 156,374,300  speedup is 1.57

default compression, "--skip-compress=grb2"
sent 156,439,778 bytes  received 110 bytes  62,575,955.20 bytes/sec
total size is 156,374,300  speedup is 1.00

Which I believe indicates that no files are compressed when the first file read has a suffix in the skip list.  Looking at the set_compression function in token.c, I see that the compression_level variable is set to 0 when a file with a suffix in the skip list is encountered, but that variable appears to only be read once during the initial execution of send_deflated_token.

Am I misunderstanding the intent of the --skip-compress option?

Thank you for your consideration,

Kit

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html