DMD Source Archive - Why?
Nick Treleaven
nick at geany.org
Thu Apr 11 17:01:21 UTC 2024
On Thursday, 11 April 2024 at 15:28:34 UTC, Steven Schveighoffer
wrote:
> On Thursday, 11 April 2024 at 01:36:57 UTC, Walter Bright wrote:
>> If we're going to add features to a .tar file, like an index,
>> aren't we then creating our own format and won't be able to
>> use existing .tar programs?
>
> No. tar programs would work fine with it. We could indicate
> they are normal files, and normal tar programs would just
> extract an "index" file when expanding, or we could indicate
> they are vendor-specific extensions, which should be ignored or
> processed as normal files by other tar programs. We are not the
> first ones to think of these things, it is in the spec.
Sounds like a good solution. Users would be able to use e.g. any
GUI program that supports tar to extract a file from the archive.
The advantage is for reading. D-specific tools should be used to
write the file. If there is any concern about this, it could even
have a different extension so long as the file format is standard
tar - users that know this can still benefit from tar readers.
There seems to be precedent for this - apparently .jar files are
.zip files.
>> Yes, one can skip through a .tar archive indexing as one goes.
>> The problem is one winds up reading the .tar archive. With the
>> .sar format, the index is at the beginning and none of the
>> rest of the file is read in, unless actually needed. .tar is
>> the only archive format I'm aware of that does not have an
>> index section, and that's because it's designed for
>> append-only magtapes. (Talk about ancient obsolete technology!)
>
> This would be a fallback, when an index isn't provided as the
> first file. So normal tar source files could be supported.
Or just error if a tar file doesn't have the expected index file.
More information about the Digitalmars-d
mailing list