zlib: expose amount of data read for compression/decompression#12939
Closed
AlexanderOMara wants to merge 2 commits intonodejs:masterfrom
Closed
zlib: expose amount of data read for compression/decompression#12939AlexanderOMara wants to merge 2 commits intonodejs:masterfrom
AlexanderOMara wants to merge 2 commits intonodejs:masterfrom
Conversation
Added bytesRead property to Zlib engines and an option to expose the engine to convenience method callbacks. Fixes: nodejs#8874
Contributor
|
It seems like this introduces two different changes, one that does what the PR title says, but there is also a (possible) change in the value passed to callbacks or returned from synchronous methods. I think it would be better to separate out those into separate PRs since the unrelated change would be semver-major IMHO. |
addaleax
reviewed
May 15, 2017
lib/zlib.js
Outdated
| if (engine._opts.info) { | ||
| return { | ||
| buffer: buffer, | ||
| engine: engine |
Member
There was a problem hiding this comment.
You can just use return { buffer, engine }; here. :)
Contributor
Author
There was a problem hiding this comment.
Good point! Done.
This was referenced May 18, 2017
Contributor
Author
|
@mscdex I've made an alternative set of pull requests that breaks the changes in two.
(I've closed this pull request in favor of those two different ones.) |
This was referenced Jun 21, 2023
This was referenced Jun 22, 2023
This was referenced Jun 22, 2023
This was referenced Jul 6, 2023
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.
Added bytesRead property to Zlib engines and an option to expose the engine to
convenience method callbacks (so that the bytesRead value can be used in the convenience methods, per related issue).
Fixes: #8874
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
I can try to add documentation later, once I know the API does not need any changes.