Possible values for --compress-level and --bzip2-compress-level

Peter Lebbing peter at digitalbrains.com
Thu Feb 25 11:26:25 CET 2016


On 24/02/16 15:11, Josef Carnap wrote:
> I have a question to the options --compress-level and
> --bzip2-compress-level. Which are the supportet (possible)
> values of each of the options? -- Numbers from 0 up to 6?

The canonical way to use the BZIP2 algorithm on Linux is through the
bzip2 program. Its man page lists the following:

>        -1 (or --fast) to -9 (or --best)
>               Set  the  block size to 100 k, 200 k ...  900 k when compressing.
>               Has no effect when decompressing.  See MEMORY  MANAGEMENT  below.
>               The --fast and --best aliases are primarily for GNU gzip compati‐
>               bility.  In particular, --fast doesn't make things  significantly
>               faster.  And --best merely selects the default behaviour.

The other two require you to look a bit further than just lowercasing
:), but I think they both use the DEFLATE compression method. On Linux,
you will often use gzip to create archives with DEFLATE. Its man page says:

>        -# --fast --best
>               Regulate the speed of compression using the  specified  digit  #,
>               where -1 or --fast indicates the fastest compression method (less
>               compression) and -9 or --best indicates the  slowest  compression
>               method  (best  compression).  The default compression level is -6
>               (that is, biased towards high compression at expense of speed).

This does however raise a question:

> Here is the description of the both options in the GPG Manual: 
> [...]
> --bzip2-compress-level sets the compression level for the BZIP2
> compression algorithm (defaulting to 6 as well). This is a different
> option from --compress-level since BZIP2 uses a significant amount of
> memory for each additional compression level.

The defaults are apparently different?

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>



More information about the Gnupg-users mailing list