tweaked gzip functionality