...
1asm
2===
3
4This library for assembly and disassembly of tar archives, facilitated by
5`github.com/vbatts/tar-split/tar/storage`.
6
7
8Concerns
9--------
10
11For completely safe assembly/disassembly, there will need to be a Content
12Addressable Storage (CAS) directory, that maps to a checksum in the
13`storage.Entity` of `storage.FileType`.
14
15This is due to the fact that tar archives _can_ allow multiple records for the
16same path, but the last one effectively wins. Even if the prior records had a
17different payload.
18
19In this way, when assembling an archive from relative paths, if the archive has
20multiple entries for the same path, then all payloads read in from a relative
21path would be identical.
22
23
24Thoughts
25--------
26
27Have a look-aside directory or storage. This way when a clobbering record is
28encountered from the tar stream, then the payload of the prior/existing file is
29stored to the CAS. This way the clobbering record's file payload can be
30extracted, but we'll have preserved the payload needed to reassemble a precise
31tar archive.
32
33clobbered/path/to/file.[0-N]
34
35*alternatively*
36
37We could just _not_ support tar streams that have clobbering file paths.
38Appending records to the archive is not incredibly common, and doesn't happen
39by default for most implementations. Not supporting them wouldn't be a
40security concern either, as if it did occur, we would reassemble an archive
41that doesn't validate signature/checksum, so it shouldn't be trusted anyway.
42
43Otherwise, this will allow us to defer support for appended files as a FUTURE FEATURE.
44
View as plain text