Adding auto gzip detection to Resource