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

added brotli compression support #1938

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mpf82
Copy link

@mpf82 mpf82 commented Nov 10, 2021

brotli compression can be enabled just like gzip compression by setting 'tools.br.on': True,

tools.br may also be combined with 'tools.gzip - the client can then decide which encoding is accepted.

If both gzip and br tools are enabled and both gzip and br are accepted encodings, br will be chosen over gzip - unless gzip has a higher qvalue

What kind of change does this PR introduce?

  • bug fix
  • feature
  • docs update
  • tests/coverage improvement
  • refactoring
  • other

What is the related issue number (starting with #)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Other information:

Checklist:

  • I think the code is well written
  • I wrote good commit messages
  • I have squashed related commits together after the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

brotli compression can be enabled just like gzip compression by setting ``'tools.br.on': True,``

``tools.br`` may also be combined with ``'tools.gzip`` - the client can then decide which encoding is accepted.

If both ``gzip`` and ``br`` tools are enabled and both ``gzip`` and ``br`` are accepted encodings, ``br`` will be chosen over ``gzip`` - unless ``gzip`` has a higher ``qvalue``
Changed default compression level for brotli from 5 to 4

Fixed an issue where the wrong compression level might be used if both gzip and brotli compression are enabled.

Changed brotli context from 'TOOLS.BROTLI' to 'TOOLS.BR' to be consistent with the tool name.
Tests now use the correct default compression level for brotli (which was changed from 5 to 4 in a previous commit)
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

Successfully merging this pull request may close these issues.

None yet

1 participant