How to force higher compression level for zipped swf library?

When I use swf library at my openfl project targeted to html, I’ve got neat zip files with manifest and swflite binary inside. But these archives have no compression at all!

So, I’ve zipped their contents by myself and all is working well. But is there any option to force openfl use higher compression level for swf libraries while bundling my project?

I think you should use Haxe API:

This would allow you to manually zip your files as you wish.
To make this process automatic you could add upon command line tools of openfl process mySWF.swf to create compressed archives. Or you could use a compile-time macro to zip your files with the API I’ve linked above.

I’ve found file AnimateLibraryExporter.hx at common swf[3.0.0] library, that responsible for building resource bundles and it contains line:

// TODO: Compressed

I’ll highly appreciate if @singmajesty will do it sometime. Such approach will be much more consistent than crutch to resolve problem externally.

I have solved problem by myself:

1 Like

Thanks for your PR !

1 Like