2015-02-24 22:07:00 +00:00
|
|
|
asm
|
|
|
|
===
|
|
|
|
|
|
|
|
This library for assembly and disassembly of tar archives, facilitated by
|
|
|
|
`github.com/vbatts/tar-split/tar/storage`.
|
|
|
|
|
|
|
|
|
2015-02-25 17:56:40 +00:00
|
|
|
Concerns
|
|
|
|
--------
|
|
|
|
|
|
|
|
For completely safe assembly/disassembly, there will need to be a CAS
|
|
|
|
directory, that maps to a checksum in the `storage.Entity` of
|
|
|
|
`storage.FileType`.
|
|
|
|
|
|
|
|
This is due to the fact that tar archives _can_ allow multiple records for the
|
|
|
|
same path, but the last one effectively wins. Even if the prior records had a
|
|
|
|
different payload.
|
|
|
|
|
|
|
|
In this way, when assembling an archive from relative paths, if the archive has
|
|
|
|
multiple entries for the same path, then all payloads read in from a relative
|
|
|
|
path would be identical.
|
|
|
|
|
2015-02-24 22:07:00 +00:00
|
|
|
|
|
|
|
Thoughts
|
|
|
|
--------
|
|
|
|
|
|
|
|
While the initial implementation is based on a relative path, I'm thinking the
|
|
|
|
next step is to have something like a FileGetter interface, of which a path
|
|
|
|
based getter is just one type.
|
|
|
|
|
|
|
|
Then you could pass a path based Getter and an Unpacker, and receive a
|
|
|
|
io.Reader that is your tar stream.
|
|
|
|
|