use gzopen in csv
simplify gzopen to avoid t/b flags
json: decode text explicitly
revert gzopen in csv