roadrunner
roadrunner copied to clipboard
[💡 FEATURE REQUEST]: Add `zstd` support
Plugin
HTTP Middleware (any)
I have an idea!
Nowadays, zstd became very popular compression standard in web world due to the ratio/speed balance of the corresponding Zstandard compression algorithm.
https://en.wikipedia.org/wiki/Zstd
I think, it would be awesome to have it as a separate middleware to promote zstd support to RoadRunner-backed servers.
EDIT: Pure Golang package: https://pkg.go.dev/github.com/klauspost/compress/zstd#section-readme
Example Usage
HTTP client sends:
Accept-Encoding: zstd
HTTP server sends:
Content-Encoding: zstd
Then, zstd-packed content after the headers.
EDIT(rustatian): if someone wanted to contribute, I've created a repository link for that.
- Check the gzip plugin middleware.
- Copy everything from it and replace gzip with zstd.
- Add tests to the http plugin with that plugin OR you may include tests in the zstd repository.