4 ms·
Go makes solving problems like this an absolute joy. I recently ran into a situation where I had to download and extract a very large tar archive, then send its
by jniedrauer 7y ago
Go makes solving problems like this an absolute joy. I recently ran into a situation where I had to download and extract a very large tar archive, then send its contents to another network resource. The device doing the extraction had severely restricted memory and storage space.
Since gzipped tar archives contain sequential data, solving it ended up being trivial. With Go, I was able to string together the file download, tar extraction, and forwarding the individual files on, all within the context of a single stream.
- kccqzy 7y agoHow is that better than curl ... | tar xv | ... in shell, or any programming language with a good streaming library?
- jniedrauer 7y agoIt's not. It's not a novel concept. But it's very clean, readable code in Go.