You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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: