Golang HTTP gzip compression
You can compress HTTP responses using gzhttp module:
go get github.com/klauspost/compress
All you need to do is to wrap BunRouter instance with gzhttp:
import (
"github.com/klauspost/compress/gzhttp"
)
router := bunrouter.New()
handler := http.Handler(router)
handler = gzhttp.GzipHandler(handler)
httpServer := &http.Server{
Handler: handler,
}