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

Async brotli decompress-compress #53025

Open
Mrgaton opened this issue May 16, 2024 · 13 comments
Open

Async brotli decompress-compress #53025

Mrgaton opened this issue May 16, 2024 · 13 comments
Labels
brotli Issues and PRs related to the brotli dependency. feature request Issues that request new features to be added to Node.js. promises Issues and PRs related to ECMAScript promises. zlib Issues and PRs related to the zlib subsystem.

Comments

@Mrgaton
Copy link

Mrgaton commented May 16, 2024

What is the problem this feature will solve?

I dont want to use util promisfy for using brotli as async

What is the feature you are proposing to solve the problem?

zlib.brotliCompressAsync

What alternatives have you considered?

No response

@Mrgaton Mrgaton added the feature request Issues that request new features to be added to Node.js. label May 16, 2024
@RedYetiDev RedYetiDev added zlib Issues and PRs related to the zlib subsystem. brotli Issues and PRs related to the brotli dependency. labels May 16, 2024
@RedYetiDev
Copy link
Member

Just curious, but what's wrong with the util.promisify way?

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

i just ugly having to declare each function separatly and having to import another lib to the code

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

im referring to brotli but it would also be good for gzip, deflate, etc.

@marco-ippolito
Copy link
Member

marco-ippolito commented May 16, 2024

like for fs and timers, ideally, you should be able to require zlib/promises.
However it has not been implemented yet and zlib doesnt have promise based apis

@RedYetiDev RedYetiDev added the promises Issues and PRs related to ECMAScript promises. label May 16, 2024
@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

Yes but why are they not inside zlib? Its just confusing

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

image
also i get an error

@marco-ippolito
Copy link
Member

image
also i get an error

For other api like fs we ship the promise based version in fs/promises.
In case of zlib this has not been done, if someone is interested in implementing it I wouldnt object

@RedYetiDev
Copy link
Member

Should I add "help wanted" for someone to take on the issue?

(ping) @nodejs/zlib in case they are already on the case

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

so this feature will actualy will be shiped to node?

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

Member

but why dont just make their async function inside zlib 🙄

@RedYetiDev
Copy link
Member

so this feature will actualy will be shiped to node?

It's possible, but someone would have to implement it, so that takes time and energy.

@Mrgaton
Copy link
Author

Mrgaton commented May 16, 2024

Could you do it for me

@RedYetiDev
Copy link
Member

RedYetiDev commented May 16, 2024

I'm not an expert on ZLIB (or even a novice), but someone will likely implement it eventually. However, it will take time, so I wouldn't expect it anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brotli Issues and PRs related to the brotli dependency. feature request Issues that request new features to be added to Node.js. promises Issues and PRs related to ECMAScript promises. zlib Issues and PRs related to the zlib subsystem.
Projects
Status: Pending Triage
Development

No branches or pull requests

3 participants