3

According to the main GitHub page for Brotli there are 11 levels of dynamic compression.

Sets on-the-fly compression Brotli quality (compression) level. Acceptable values are in the range from 0 to 11.

However another page of the project shows that the command line only supports 9 levels of compression

compression level (0-9); bigger values cause denser, but slower compression

I tested to see if level 9 from the command line was the same as level 11 dynamic compression. However it is not.

Is there any way compress a file using the command line with level 11 compression?

YAHsaves
  • 1,697
  • 12
  • 33

1 Answers1

4

This issue explains it best:

The default quality is mentioned:

  -Z, --best      use best compression level (11) (default)

I think the single dash (-0 to -9) quality parameters are just for convenience, the problem is that by convention a single dash parameter can only by followed by a single character, so -10 or -11 would break the convention.

Barry Pollard
  • 40,655
  • 7
  • 76
  • 92
  • Thus, compression level `10` is impossible from the command line? – Dima Tisnek Dec 25 '20 at 03:34
  • 1
    Not at all! From the first line (https://github.com/google/brotli/issues/725) you can see it's possible with the `-q 10` or `--quality=10` switches. There just isn't a single digit/character switch. Guess it would be easy enough to add one if there was demand for it, but would imagine most go to 11 (`-Z`) when at that level. – Barry Pollard Dec 26 '20 at 06:34