refactor gzip default filter function