nginxbrotlingx-brotli

Why does Brotli Command Line only allow up to level 9?


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?


Solution

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