News for hackers. Stuff that matters.
Re:Postgres WASM by justinclift on Monday October 03, 2022 @01:35PM (#33070882)
Have you looked at compressing that ~16MB wasm file with something like Brotli?

When I was actively doing stuff with wasm (~2019), Brotli was the best compression approach. eg 16MB uncompressed -> 2.4MB compressed

https://github.com/golang/go/wiki/WebAssembly#reducing-the-s...

Re:Postgres WASM by pistoriusp on Monday October 03, 2022 @02:36PM (#33071770)
Our demo is on Netlify, so I'm assuming that they've got gzip or something along those lines enabled.

On my 50mbit/s (Germany :/) connection it's ~2 seconds

Re:Postgres WASM by ankraft on Tuesday October 04, 2022 @03:44AM (#33077560)
Zstandard is able to compress this file to 1.4MB.

  a2b67f25.bin         :  8.26%   (16777216 => 1386514 bytes, a2b67f25.bin.zst)
Re:Postgres WASM by dchest on Tuesday October 04, 2022 @05:00AM (#33077963)
brotli compresses it to 1047967 bytes. And you can serve it as-is with Content-Encoding: br, unlike zstd.

(zstd at --ultra -22 level: 1149751 bytes).

Re:Postgres WASM by miohtama on Tuesday October 04, 2022 @10:47AM (#33081158)
Why is Brotli more efficient on Wasm files? I believe their built-in dictionary was tuned for HTML, CSS and JS content.
Re:Postgres WASM by robryk on Tuesday October 04, 2022 @11:41AM (#33081983)
I'd guess that the context model (based on last 1-2 bytes) can be used to separate opcodes and their parameters.