-
Notifications
You must be signed in to change notification settings - Fork 37
Support for brotli #21
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
Comments
I could try to make a PR if you're interested |
imo we should just have an api for adding more compression methods |
Looks like expressjs/compression#62 ? |
BTW, Chrome seems to have brotli enabled by default for upcoming versions: https://chromium.googlesource.com/chromium/src/+/e3118678848807c0ea60ab086e3d803cb1913098%5E%21/#F0 |
Any progress on this? |
PR welcomed :) |
Hey, guys, wondering if there is any progress on this? would love to see brotli support added |
was going to implement this but it seems as though brotli is only better on larger sized payloads. we might need to think about how we implement this more. my 2048-byte test buffer actually got bigger with brotli somehow. |
@jonathanong followup on that - did some testing myself recently using https://github.com/tuananh/kompression and https://www.npmjs.com/package/shrink-ray
also noticed that brotli indeed uses more memory. I can try help with PR if you need but not sure if it is worth it at all. |
yeah i'm not sure it's worth it. seems like it's better to let your CDN do the extra heavy lifting. |
Added a PR #80 which implements optional brotli support... I would specify a quality of 5-8 though instead of the default of 11, as it will be much slower than gzip otherwise. You really don't gain much for dynamic content vs. the extra time for compression. I did the work and made it optional in case someone really wants it, or in case the iltorb library gets significantly better. my single use case (JSON response, 181k uncompressed):
|
Any progress on this? |
@jonathanong brotli makes a lot of sense for API responses under high load. we usually sticked to CDN doesn't help with API :-/ |
closed by #99 |
Here an interesting link : https://hacks.mozilla.org/2015/11/better-than-gzip-compression-with-brotli/
The text was updated successfully, but these errors were encountered: