backport parts of #957 needed for #987

- common config for gzip compression filters
backport #987