-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Closure minification adds \uxxxx escapes into output file, increasing code size #4158
Comments
The compiler defaults to outputting ASCII, but you can specify a different output charset via the Does |
Thanks, yeah, that works! |
juj
added a commit
to juj/emscripten
that referenced
this issue
Mar 6, 2024
juj
added a commit
to juj/emscripten
that referenced
this issue
Mar 7, 2024
juj
added a commit
to juj/emscripten
that referenced
this issue
Mar 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In emscripten-core/emscripten#21426 we are discussing ways to improve on Base64 encoding of binary WebAssembly Modules embedded inside .js code. It is observed that both gzip and brotli compress Base64 pessimistically.
One observation here is that the UTF-8 standard is well-specified, so we can attempt to embed bytes directly as UTF-8 code points.
Attempting to do so runs into a Closure minification problem however.
Input: ab.zip
This code nicely prints out all bytes from 0x00 up to 0xFF.
Input file is 689 bytes in size. However, running this file through Closure compiler Advanced Optimizations produces a file that is 1225 bytes in size: ab_closured.zip
Online Closure link
The text was updated successfully, but these errors were encountered: