Commit 7bad3d1c authored by JessonChan's avatar JessonChan

change the compress leve to [0~9]

parent 4db78f24
......@@ -44,7 +44,7 @@ func InitGzip(minLength, compressLevel int, methods []string) {
gzipMinLength = minLength
}
gzipCompressLevel = compressLevel
if gzipCompressLevel < flate.DefaultCompression || gzipCompressLevel > flate.BestCompression {
if gzipCompressLevel < flate.NoCompression || gzipCompressLevel > flate.BestCompression {
gzipCompressLevel = flate.BestSpeed
}
getMethodOnly = (len(methods) == 0) || (len(methods) == 1 && strings.ToUpper(methods[0]) == "GET")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment