-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
zlib: add support for brotli compression dictionary #61763
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
base: main
Are you sure you want to change the base?
Conversation
This change adds JS API support for custom compression dictionaries with Brotli in the zlib library. The underlying Brotli dependency already supports this and zstd exposes something similar. This follows the zstd approach for using a custom dictionary but for Brotli. Fixes: nodejs#52250
addaleax
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61763 +/- ##
==========================================
- Coverage 89.74% 89.72% -0.03%
==========================================
Files 675 675
Lines 204642 204727 +85
Branches 39322 39348 +26
==========================================
+ Hits 183657 183687 +30
- Misses 13257 13299 +42
- Partials 7728 7741 +13
🚀 New features to boost your workflow:
|
|
I updated the initializer to use an r-value ref and added some argument validation on the js side along with some tests. Linters all pass locally for me. |
|
I ran |
This change adds JS API support for custom compression dictionaries with Brotli in the zlib library. The underlying Brotli dependency already supports this and zstd exposes something similar. This follows the zstd approach for using a custom dictionary but for Brotli.
Fixes: #52250
Notes
I wanted to get the change up here first to get feedback and ensure the API makes sense. I can then update any relevant docs. The tests