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

go/bundle explain how to use gzip with this #841

Open
gaycodegal opened this issue Jan 1, 2023 · 1 comment
Open

go/bundle explain how to use gzip with this #841

gaycodegal opened this issue Jan 1, 2023 · 1 comment

Comments

@gaycodegal
Copy link

Web bundles have header information, I know gzip packaging uses headers to help work, and web bundle is definitely not compressed by default as zip vs wbn comparisons I've done shows wbn is larger by a decent amount.

Part of the states goal of web bundles is to work in areas with little internet. Typically this comes hand in hand with low on device storage. Thus, I think gzipping the contents of a web bundle probably would make a user more willing to use and keep these files. I'm not familiar enough with the format to know how to do that, but it would be a good tutorial to publish to help app makers get the most out of the format.

From my comparison I zipped a pico8 game called lava joe and it was 557KB, whereas the wbn version was 1.81 MB. I also ran into an issue where the game didn't run to well in web bundle format because navigation to different url #fragment broke it in chrome, but I'll assume it would have worked without this

@sonkkeli
Copy link
Collaborator

To overcome this (as it's not supported by this Golang tool at least for now), you could use the webpack plugin version of web bundle generator together with this Webpack compression plugin which supports gzipping before "webbundling" the code.

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