roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

[💡 FEATURE REQUEST]: Add `zstd` support

Open maximal opened this issue 10 months ago • 7 comments

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.

  1. Check the gzip plugin middleware.
  2. Copy everything from it and replace gzip with zstd.
  3. Add tests to the http plugin with that plugin OR you may include tests in the zstd repository.

maximal avatar Dec 04 '24 11:12 maximal