what is the default value for --compress-level=?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

what is the default value for --compress-level=?

Tomasz Chmielewski-2
What is the default value for --compress-level=? 6? 9?

The fine manual only mentions:

       --compress-level=NUM
              Explicitly set the compression level to use (see --compress) instead of letting it default.  If NUM is non-zero, the --compress option is implied.


Also, what are allowed values? 1-9? 0-9? Something else?


--
Tomasz Chmielewski
http://wpkg.org
--
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
Reply | Threaded
Open this post in threaded view
|

Re: default value for --compress-level

Benjamin R. Haskell-7
On Tue, 14 Sep 2010, Tomasz Chmielewski wrote:

> What is the default value for --compress-level=? 6? 9?
>
> The fine manual only mentions:
>
>       --compress-level=NUM
>              Explicitly set the compression level to use (see
>              --compress) instead of letting it default.  If NUM is
>              non-zero, the --compress option is implied.
>
>
> Also, what are allowed values? 1-9? 0-9? Something else?

From a comment in zlib/zlib.h in the source:

"""
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
1 gives best speed, 9 gives best compression, 0 gives no compression at
all (the input data is simply copied a block at a time).
Z_DEFAULT_COMPRESSION requests a default compromise between speed and
compression (currently equivalent to level 6).
"""

Z_DEFAULT_COMPRESSION is defined as (-1), and appears to be the value
used if --compress is specified without --compress-level, making the
default functionally equivalent to 6.

--
Best,
Ben
--
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
Reply | Threaded
Open this post in threaded view
|

Re: what is the default value for --compress-level=?

Wayne Davison-2
In reply to this post by Tomasz Chmielewski-2
On Tue, Sep 14, 2010 at 5:06 AM, Tomasz Chmielewski <[hidden email]> wrote:
What is the default value for --compress-level=? 6? 9?

Rsync tells the zlib library to "use the default compression", so if we read zlib's docs, it says this:

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

Rsync's docs should probably mention that too.

..wayne..

--
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