lanrat / czds

simple golang API and tools to interact with czds.icann.org
https://pkg.go.dev/github.com/lanrat/czds
GNU General Public License v3.0
72 stars 14 forks source link

Download and Extract #6

Closed emreozudogru closed 4 years ago

emreozudogru commented 4 years ago

Is it possible to add download and extract option?

lanrat commented 4 years ago

If you want to get the uncompressed stream you can use the Client.DownloadZoneToWriter and pass the stream to gzip.NewReader using io.Pipe.

Since CZDS provides compressed files, and its trivial to extract them after downloading with a simple shell script I'm not super enthusiastic about adding the option, but I would accept a pull request that adds this to CZDS-DL behind a -uncompress flag. Or you can use add that logic to your own client.

lanrat commented 4 years ago

Closing this for reasons in the previous comment.