aboutsummaryrefslogtreecommitdiff
path: root/go.sum
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2020-05-15 15:36:26 +0200
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2020-05-15 15:36:26 +0200
commit339ad36634b68ab5b4d90fb9991e38d5020a1039 (patch)
tree167e613ce9b8eef1d3b92c18b00d4039cbc8df91 /go.sum
parentDon't wrap conn with a TLS Client if it's already a TLS Conn (diff)
downloadfasthttp-339ad36634b68ab5b4d90fb9991e38d5020a1039.tar.gz
fasthttp-339ad36634b68ab5b4d90fb9991e38d5020a1039.tar.bz2
fasthttp-339ad36634b68ab5b4d90fb9991e38d5020a1039.zip
Add Brotli support
New Functions: CompressHandlerBrotliLevel(h RequestHandler, brotliLevel, otherLevel int) RequestHandler Request.BodyUnbrotli() ([]byte, error) Response.BodyUnbrotli() ([]byte, error) AppendBrotliBytesLevel(dst, src []byte, level int) []byte WriteBrotliLevel(w io.Writer, p []byte, level int) (int, error) WriteBrotli(w io.Writer, p []byte) (int, error) AppendBrotliBytes(dst, src []byte) []byte WriteUnbrotli(w io.Writer, p []byte) (int, error) AppendUnbrotliBytes(dst, src []byte) ([]byte, error) New Constants: CompressBrotliNoCompression CompressBrotliBestSpeed CompressBrotliBestCompression CompressBrotliDefaultCompression Brotli compression levels are different from gzip/flate. Because of this we have separate level constants and CompressHandlerBrotliLevel takes 2 levels. I didn't add Brotli support to CompressHandler as this could cause a spike in CPU usage when users upgrade fasthttp. fasthttp.CompressBrotliDefaultCompression is not the same as brotli.DefaultCompression. brotli.DefaultCompression is more than twice as slow as fasthttp.CompressBrotliDefaultCompression which I thought was unreasonable as default.
Diffstat (limited to 'go.sum')
-rw-r--r--go.sum2
1 files changed, 2 insertions, 0 deletions
diff --git a/go.sum b/go.sum
index 96298ae..863089e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,3 +1,5 @@
+github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
+github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/klauspost/compress v1.10.4 h1:jFzIFaf586tquEB5EhzQG0HwGNSlgAJpG53G6Ss11wc=
github.com/klauspost/compress v1.10.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=