Describe the bug
The HTTP compression middleware in compression.ts only supports gzip and deflate encoding. Modern browsers (Chrome 123+, Firefox 126+, Safari 18+) send zstd in Accept-Encoding and zstd provides ~30-40% better compression than gzip at similar speeds.
Steps to reproduce
- Make a request to the OpenCode server with
Accept-Encoding: zstd, gzip
- Observe the response uses gzip, not zstd
Expected behavior
The server should negotiate zstd as the preferred encoding when the client supports it, falling back to gzip/deflate.
System info
- OpenCode version: v1.15.3
- OS: Linux
Describe the bug
The HTTP compression middleware in
compression.tsonly supports gzip and deflate encoding. Modern browsers (Chrome 123+, Firefox 126+, Safari 18+) sendzstdinAccept-Encodingand zstd provides ~30-40% better compression than gzip at similar speeds.Steps to reproduce
Accept-Encoding: zstd, gzipExpected behavior
The server should negotiate zstd as the preferred encoding when the client supports it, falling back to gzip/deflate.
System info