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

Binary content #8

Open
arcanis opened this issue Mar 10, 2021 · 1 comment
Open

Binary content #8

arcanis opened this issue Mar 10, 2021 · 1 comment

Comments

@arcanis
Copy link

arcanis commented Mar 10, 2021

I suspect this is slightly out of scope, but at the same time it's close enough that it may be worth a mention. Would module fragments be good candidates to also add support for arbitrary binary data within JS files? For instance:

  • I maintain a software which embeds multiple brotli-encoded strings. Since JS doesn't have a way to efficiently store binary data, I need to store them as base64, thus increasing the bundle size.

  • I opened in Node a discussion about Packaged apps (a single file embedding a full application, including data files, wasm, etc). Module fragments supporting binary data would allow to defer this to the userland, since userland could just store the application as a binary string along with the suitable decompression algorithm.

@littledan
Copy link
Member

I do see binary content as out of scope--I really can't see how it can work syntactically in a JS file. I'd prefer an approach more like https://github.com/wpack-wg/bundled-responses for that use case.

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

No branches or pull requests

2 participants