> If the client passes br in the Accept-Encoding header the Go server serves the Brotli-compressed version of the static file, otherwise it serves the uncompressed version.
Have you considered zstd? It's in most browsers.[0] While it might not compress as small, it decompresses way faster, and might make up for the few extra bytes sent.
Yeah I have thought about zstd but it seemed like roughly a wash. Also most of the comparisons between zstd and brotli seemed to have been done years ago. Worth exploring in an article sometime though...
Have you considered zstd? It's in most browsers.[0] While it might not compress as small, it decompresses way faster, and might make up for the few extra bytes sent.
[0] https://caniuse.com/?search=zstd