handlers
handlers copied to clipboard
Add zstd support for compression middleware
What type of PR is this? (check all applicable)
- [ ] Refactor
- [x] Feature
- [ ] Bug Fix
- [x] Optimization
- [ ] Documentation Update
- [x] Go Version Update
- [x] Dependency Update
Description
Modern browsers now natively support zstandard, a superior compression algorithm from a compression ratio and speed standpoint.
See: https://caniuse.com/zstd
This PR:
- Adds zstd support to compress middleware with github.com/klauspost/compress/zstd
- Prefers zstd over gzip or flate when possible to leverage its superior compression ratios and speed
- Updates documentation and adds unit tests
Added/updated tests?
- [x] Yes
- [ ] No, and this is why: please replace this line with details on why tests have not been included
- [ ] I need help with writing tests
Run verifications and test
- [x]
make verifyis passing - [x]
make testis passing