Closed raylu closed 1 year ago
netlify is using something around compression level 2 or 3:
$ curl 'https://craftingway.app/recipes.json' -H 'Accept-Encoding: gzip, deflate, br' -I [...] content-length: 183774 $ brotli -3vf public/recipes.json Compressed [public/recipes.json]: 2.559 MiB -> 169.192 KiB
with msgpackr in records mode, I'm able to get something 41% smaller after brotli compression
$ brotli -3vf public/recipes.msgpack Compressed [public/recipes.msgpack]: 480.569 KiB -> 118.525 KiB
there's also another 7 KiB of msgpackr JS
$ curl 'http://localhost:5173/node_modules/.vite/deps/msgpackr_unpack.js' -o m.js $ brotli -3vf m.js Compressed [m.js]: 31.917 KiB -> 7.470 KiB
Sweet. Apparently this is even faster than JSON.parse, too.
JSON.parse
netlify is using something around compression level 2 or 3:
with msgpackr in records mode, I'm able to get something 41% smaller after brotli compression
there's also another 7 KiB of msgpackr JS