valyala / fasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
MIT License
21.88k stars 1.76k forks source link

Add support for zstd (Zstandard) encoding #1509

Closed gaby closed 8 months ago

gaby commented 1 year ago

Hello, currently fasthttp supports gzip and brotli as encoding when serving compressed content. It also supports them for fasthttp.fs. It would be very beneficial to add support for zstd whicb provides faster decompression rates.

The library used by fashttp already supports zstd. Information here: https://github.com/klauspost/compress/tree/master/zstd#zstd

Tools like curl already support auto-decompression of zstd content since 2020: https://daniel.haxx.se/blog/2020/08/19/curl-7-72-0-more-compression/

v4rn commented 1 year ago

@erikdubbelboer new here. can i pick this?

erikdubbelboer commented 1 year ago

@v4rn yes please!

gaby commented 1 year ago

@v4rn You had any luck with this?

v4rn commented 1 year ago

@gaby sorry, I had some competing priorities last couple of weeks, just started looking at this. Prioritizing it this week.

gaby commented 1 year ago

@v4rn Any luck? thanks!

gaby commented 1 year ago

@v4rn Any update on this?

Max-Cheng commented 10 months ago

@gaby Since I'm curious about the internal implementation of fiber, I'm going to start fasthttp from this issue, wish me luck!

gaby commented 10 months ago

@Max-Cheng Awesome, yeah main reason i opened this ticket is to eventually add support in Fiber.

Max-Cheng commented 9 months ago

@gaby zstd will be soon. I need more time to test corner cases https://github.com/valyala/fasthttp/pull/1700

gaby commented 9 months ago

@Max-Cheng Awesome! Looking forward

gaby commented 8 months ago

Fixed via https://github.com/valyala/fasthttp/pull/1701