Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is a default quality of brotli command? #725

Closed
stokito opened this issue Oct 27, 2018 · 2 comments
Closed

What is a default quality of brotli command? #725

stokito opened this issue Oct 27, 2018 · 2 comments

Comments

@stokito
Copy link

stokito commented Oct 27, 2018

Nor in brotli --help nor in man brotli is not mentioned what is a default compression quality.
It just said that quality can be in range of 0-9 but later it said that -q param can be in range 0-11.

$ brotli -h
Usage: brotli [OPTION]... [FILE]...
Options:
  -#                          compression level (0-9)
  -q NUM, --quality=NUM       compression level (0-11)
  -Z, --best                  use best compression level (11) (default)

What I see from sources in brotli.c in main method:

int main(int argc, char** argv) {
  Command command;
  Context context;
  context.quality = 11;

So it looks like the default quality is 11 i.e. best.

  1. Could you mention this somewhere?
  2. Can we set the maximum quality by -11 param?
@chylex
Copy link
Contributor

chylex commented Oct 31, 2018

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.

@eustas
Copy link
Collaborator

eustas commented Jul 2, 2020

@chylex Thanks for the answer.

@eustas eustas closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants