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

proposal: Introduce the Brotli Compression Algorithm #4707

Open
BlackAsLight opened this issue May 10, 2024 · 2 comments
Open

proposal: Introduce the Brotli Compression Algorithm #4707

BlackAsLight opened this issue May 10, 2024 · 2 comments
Labels
feedback welcome We want community's feedback on this issue or PR suggestion a suggestion yet to be agreed

Comments

@BlackAsLight
Copy link
Contributor

Bouncing off of what was briefly discussed on discord, I'm opening this issue to discuss the possibility of having the Brotli compression algorithm (RFC7932) added somewhere to Deno's STD. I would like to have a go at implementing the algorithm myself, but would also like feedback on the idea from everyone else.

I think Brotli would be a good addition to the STD as it's a widely supported compression format supported by almost all browsers under the Accept-Encoding header and would allow people to easily compress their content without additional tooling. Brotli is also supposedly faster than Gzip, although I doubt a pure JavaScript implementation of Brotli would beat the built in implementation of Gzip, but would still be beneficial for when serving static content as that can all be pre-brotli-ed.

The default suggested location for such an addition to be introduced was under @std/streams, although this doesn't seem like a good fit in practicality as the contents of @std/streams is more focused towards utility streams. On a side note, there also seems to be quite an inconsistency about whether a file format get's its own module named after itself (csv, toml, yaml) or if it gets placed under its type of category (archive/tar).

@iuioiua
Copy link
Collaborator

iuioiua commented May 13, 2024

To reiterate, I suggested std/streams just so there are no blockers to getting the ball rolling with an implementation. I think such an implementation should exist in std/compress (or similar). However, more discussion is needed before committing to a whole new package.

@iuioiua iuioiua added the suggestion a suggestion yet to be agreed label May 13, 2024
@iuioiua
Copy link
Collaborator

iuioiua commented May 13, 2024

Either way, I like the idea of a BrotliCompressionStream() and BrotliDecompressionStream().

@iuioiua iuioiua added the feedback welcome We want community's feedback on this issue or PR label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback welcome We want community's feedback on this issue or PR suggestion a suggestion yet to be agreed
Projects
None yet
Development

No branches or pull requests

2 participants