Refactor: move gzip to generic