frictionlessdata / tableschema-go

A Go library for working with Table Schema.
MIT License
46 stars 10 forks source link

Support GZIP compressed CSV files #94

Closed cuducos closed 3 years ago

cuducos commented 3 years ago

Overview

In many projects, I work we store compressed CSV (e.g. mydata.csv.gz) instead of plain CSV (e.g. mydata.csv).

Is it interesting for this project to allow csv.FromFile to support gzipped CSV files? If so, I'd be more than happy to implement this feature.

Intended roadmap

  1. We can use filepath.Ext to check whether path has .gz or .gzip as extension when we generate the csv.Source;
  2. Then, if that's the case, we use Go's native compress/gzip lib to return a gzip.Reader;
  3. A gzip.Reader matches io.ReadCloser interface, satisfying csv.Source.

What do you think?

Please preserve this line to notify @danielfireman (lead of this repository)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

danielfireman commented 3 years ago

I believe this is a great idea. Unfortunately I won't be able to get to this in a month or so.