echo
echo copied to clipboard
feat(middleware): add Deflate middleware
Add Deflate middleware which is very similar to the current Gzip middleware's implementation, I think it will be nice to have deflate as well if someone also needs it.
I didn't change any public function and struct in compress.go, and didn't touch existing test cases in compress_test.go as well, so I think this PR won't break backward compatibility.
Codecov Report
Merging #2085 (6e6ae1e) into master (4a1ccdf) will decrease coverage by
0.02%. The diff coverage is88.00%.
@@ Coverage Diff @@
## master #2085 +/- ##
==========================================
- Coverage 92.21% 92.18% -0.03%
==========================================
Files 37 37
Lines 3019 3034 +15
==========================================
+ Hits 2784 2797 +13
- Misses 148 150 +2
Partials 87 87
| Impacted Files | Coverage Δ | |
|---|---|---|
| middleware/compress.go | 84.84% <88.00%> (+0.84%) |
:arrow_up: |
| ip.go | 100.00% <0.00%> (ø) |
|
| echo.go | 95.14% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 4a1ccdf...6e6ae1e. Read the comment docs.