ar
ar copied to clipboard
Support chunked file writing
This is really a superset of #4.
Currently,
https://github.com/blakesmith/ar/blob/809d4375e1fb5bb262c159fc3ec2e7a86a8bfd28/writer.go#L93-L96
essentially closes the file after each call to Write
, which means you can't use the API to write a file one piece at a time (e.g. with io.Copy
, or dumping out from a stream),
It should only write that footer when aw.nb == 0
.
In my opinion, the best way to handle this would be to follow the example of archive/tar
and don't write the file footer until either the next call to WriteHeader()
or Close()
. Of course that would require introduction of a Close
method, which would be a breaking API change.