[GH-ISSUE #986] [FEATURE REQUEST] Precompress web server wasm also in other formats #356

Open
opened 2026-02-27 08:16:50 +03:00 by kerem · 0 comments
Owner

Originally created by @jaschiu on GitHub (Oct 6, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/986

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:

  • Uncompressed: 2106301
  • gzip (pigz -9k): 722132
  • zstd (zstdmt -19): 562137
  • brotli (brotli -Z): 513328

Additional context
Add any other context or screenshots about the feature request here.

N/A

Originally created by @jaschiu on GitHub (Oct 6, 2024). Original GitHub issue: https://github.com/lldap/lldap/issues/986 **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: - Uncompressed: 2106301 - gzip (`pigz -9k`): 722132 - zstd (`zstdmt -19`): 562137 - brotli (`brotli -Z`): 513328 **Additional context** Add any other context or screenshots about the feature request here. N/A
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#356
No description provided.