zlib: add support for brotli compression dictionary#61763
Open
rokob wants to merge 3 commits intonodejs:mainfrom
Open
zlib: add support for brotli compression dictionary#61763rokob wants to merge 3 commits intonodejs:mainfrom
rokob wants to merge 3 commits intonodejs:mainfrom
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
Collaborator
addaleax
reviewed
Feb 11, 2026
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61763 +/- ##
=======================================
Coverage 89.74% 89.74%
=======================================
Files 675 675
Lines 204642 204729 +87
Branches 39322 39333 +11
=======================================
+ Hits 183657 183744 +87
+ Misses 13257 13253 -4
- Partials 7728 7732 +4
π New features to boost your workflow:
|
cjihrig
approved these changes
Feb 11, 2026
Author
|
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. |
jasnell
approved these changes
Feb 12, 2026
addaleax
approved these changes
Feb 12, 2026
Author
|
I ran |
addaleax
approved these changes
Feb 12, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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