Updated gzip approach with JSON generation/delivery