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

fix(node/zlib): cast Dataview and Buffer to uint8 #21746

Merged
merged 1 commit into from
Dec 31, 2023

Conversation

JoviDeCroock
Copy link
Contributor

@JoviDeCroock JoviDeCroock commented Dec 31, 2023

This fixes point 2 of #20516

This adds a conversion from Dataview/Buffer by returning obj.buffer which can be converted to a UInt8Array.

Question: Regarding point 4 of the mentioned issue would it be appropriate to copy the toU8 helper to the zlib.mjs methods?

@CLAassistant
Copy link

CLAassistant commented Dec 31, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@littledivy littledivy merged commit 08fc8d5 into denoland:main Dec 31, 2023
14 checks passed
@littledivy
Copy link
Member

Question: Regarding point 4 of the mentioned issue would it be appropriate to copy the toU8 helper to the zlib.mjs methods?

Sure, I assume that would be in _zlib_binding.mjs

littledivy pushed a commit that referenced this pull request Jan 3, 2024
Fixes #20516 
Follow up to #21747 and #21746

This tackles the last point of #20516 where certain inputs weren't
accepted in the other zlib methods

This adds the `toU8` conversion of `_brotli` to `_zlib.mjs`, when we
create the ZLibBuffer, we'll sanitize the input. I noticed that the
async had no handler for `string` input so I added that as well.
bartlomieju pushed a commit that referenced this pull request Jan 4, 2024
This fixes point 2 of #20516 

This adds a conversion from Dataview/Buffer by returning `obj.buffer`
which can be converted to a `UInt8Array`.

Question: Regarding point 4 of the mentioned issue would it be
appropriate to copy the toU8 helper to the `zlib.mjs` methods?
bartlomieju pushed a commit that referenced this pull request Jan 4, 2024
Fixes #20516 
Follow up to #21747 and #21746

This tackles the last point of #20516 where certain inputs weren't
accepted in the other zlib methods

This adds the `toU8` conversion of `_brotli` to `_zlib.mjs`, when we
create the ZLibBuffer, we'll sanitize the input. I noticed that the
async had no handler for `string` input so I added that as well.
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

Successfully merging this pull request may close these issues.

3 participants