[HTML5] Can I un-zip my assets at runtime? How?

Recently, I saw that my html5 export has pako.js (Did it always have it and I never realized? probably.)

Since my research says that pako.js is “zlib port to javascript, very fast!”

Can I zip my assets, improving download times on the HTML5 target, unzip them at runtime and use them?

How do I do something as cool as that? :open_mouth:

Thanks and stay awesome openFL :smiley:

Are you sure this is necessary? Nearly all modern servers can automatically compress files.

Edit: though you may need to enable this feature. This tool claims to be able to check whether it’s enabled.

Oh, and also, most image files are already compressed, and compressing compressed files can actually increase the filesize. Use OptiPNG if you really want to save bytes, but don’t zip your images. I think the same applies to audio, but I’m not sure.