Support for statically compressed brotli content-encoding
This MR is a brotli version of !25 (merged) and addresses #125 (closed).
A couple things:
- If the client has
bror*in theirAccept-Encoding, first look for a.brfile -> fallback to.gz-> fallback uncompressed. - Else, do not break existing logic
This is still a work in progress since I've not gotten the tests to work just yet. The current gzip tests use gzip from the standard library, which of course doesn't come with an implementation of brotli. I'm trying to use the go bindings to the original brotli library in C. There are a couple issues I'm running into: I'm using github.com/dsnet/compress/brotli
-
I've not gotten the bindings to work just yet, hence brotli testing is currently commented outNow using a pure golang implementation -
I'm installing the.brotlilibrary from the debian repos in our testing docker containers. This doesn't work on thegolang:1.8container since that is based on debian jessie rather than debian stretch, and jessie's repos don't have thebrotlilibraryNow running tests on alpine, which has no issues.The pure golang implementation doesn't need this. -
I'm not able to test brotli compression using files fromFigured it out, thanks!http://group.test.io/files.
I would appreciate if someone can help me figure these out.
Edited by 🤖 GitLab Bot 🤖