Reverted the earlier fix and made a change to decompress gzip output.

Reverted the earlier fix and made a change to decompress gzip output.