4 ms·
> if someone invented a binary format for JS that was interchangeable with the current text format We already have gzip, although even with gzip minifying is u
by Yaggo 11y ago
> if someone invented a binary format for JS that was interchangeable with the current text format
We already have gzip, although even with gzip minifying is useful, because gzip isn't content-aware. You can also enable source maps in production if you care about openness. The client doesn't have to fetch the maps/sources until developer tools is opened.
- AriaMinaei 11y agoWell, gzip is general purpose. A binary format would be aware of JS' semantics and possibly yield much higher compression rates. In fact, WASM's binary format is intended to be that way and apparently is yields more compression than using only gzip: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#why-a-binary-encoding-instead-of-a-text-only-representation https://github.com/WebAssembly/design/blob/master/BinaryEnco...