combining streams, json parsing and finally gzipping output.