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

Changing Brotli Compression Level #8

Open
Duoquote opened this issue Jan 14, 2021 · 4 comments
Open

Changing Brotli Compression Level #8

Duoquote opened this issue Jan 14, 2021 · 4 comments

Comments

@Duoquote
Copy link

Is there a way to change the brotli compression level?

@friedelwolff
Copy link
Owner

At the moment it is hard-coded to a fixed value (4). I've found this to give pretty good benefit for the cost. Maybe you had a different use-case in mind?

@Duoquote
Copy link
Author

I was planning to compress 80megabytes of data and sacrifice a few megabytes to gain speed from compression, it gets compressed to 7 megabytes but takes some time to compress.

@friedelwolff
Copy link
Owner

That is indeed an interesting case. Is this a streaming response? If we know the size beforehand, we could increase the compression level. In the streaming case, we don't know the size, so can't use such a simple heuristic.

@Duoquote
Copy link
Author

Duoquote commented Feb 5, 2021

No, I want to decrease the compression level to gain speed from compression, my cpu struggles from compression but the bandwidth is ok with that.

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

2 participants