switched to gzip stream instead of compressing an array