Alternative approach to #1727, enable callers to influence compression encoding priority. Also changes the default order so that Zstd comes before Gzip if enabled (which happens when the zstd Cargo feature is explicitly enabled).
Solution
Implement an internal array while avoiding making changes to existing public API.
Not completely sure whether this actually solves the original issue described in #1727. IMO it would be better if the config wrapper allowed overwriting the EnabledCompressionEncodings instead of appending to it.
Motivation
Alternative approach to #1727, enable callers to influence compression encoding priority. Also changes the default order so that
Zstd
comes beforeGzip
if enabled (which happens when thezstd
Cargo feature is explicitly enabled).Solution
Implement an internal array while avoiding making changes to existing public API.
cc @CapCap