finalize GZIP filter function with tests