[FEATURE REQUEST] Precompress web server wasm also in other formats #986
Labels
docker
enhancement
New feature or request
frontend
Issues that require a frontend change
help wanted
Extra attention is needed
Motivation
Why do you want the feature? What problem do you have, what use cases would it enable?
Currently, the web server wasm is precompressed in gzip and served if the HTTP client accepts the gzip encoding. However, most web browsers with their most recent updates usually support other encoding schemes such as brotli and zstd, so if the wasm is precompressed with gzip, why not some of the others? zstd can achieve better compression ratios with similar or better decompression speed than gzip. brotli achieves even better compression ratios with much slower decompression speed than gzip/zstd.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I think that given the superiority of zstd over gzip, the web server should support serving the wasm file pre-compressed with zstd if the HTTP client accepts zstd encoding. Given that making many precompressions of different schemes can bloat the Docker image, I am not opposed to excluding brotli precompression given its slower compression/decompression speeds if that is a concern.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. You can include workarounds that are currently possible.
I have a custom lldap Docker image and here are the sizes of its wasm file with the precompressions:
pigz -9k
): 722132zstdmt -19
): 562137brotli -Z
): 513328Additional context
Add any other context or screenshots about the feature request here.
N/A
The text was updated successfully, but these errors were encountered: