3 ms·
I would argue the upsides out-weigh the downsides. Out of two downsides you mention, one actually applies to tar archives as well (the ordering of files can be
by cyphar 6y ago
I would argue the upsides out-weigh the downsides. Out of two downsides you mention, one actually applies to tar archives as well (the ordering of files can be random) -- it's just that there's no index to compare against. If you added an index to a tar archive it would have the same issue.
The compression point you make is fair, though there is a clear trade-off when it comes to random-access. Naive whole-archive compression makes efficient random-accesses impossible because you have to decompress everything before the data you're trying to access. A sufficiently-clever archive and compression format may be able to overcome that, but I'd argue that zip made a reasonable trade-off here.
> AFAIK tar only checksums the header
tar doesn't checksum anything, there isn't even a CRC.
- masklinn 6y ago> I would argue the upsides out-weigh the downsides. I could agree, but that doesn't mean replacing tars by zips doesn't have drawbacks. Even more so as you can use whatever compression scheme you want with tars, not so with zips (unless you use them as tars and then… they're just a worse tar). > Out of two downsides you mention, one actually applies to tar archives as well (the ordering of files can be random) -- it's just that there's no index to compare against. There is no schyzophrenia because tars always behave that way. > If you added an index to a tar archive it would have the same issue. Yes, if tar were a completely different format it would have different issues. It's not though. > Naive whole-archive compression makes efficient random-accesses impossible because you have to decompress everything before the data you're trying to access. A sufficiently-clever archive and compression format may be able to overcome that, but I'd argue that zip made a reasonable trade-off here. So did tar, they're just different tradeoffs. For instance archiving tons of small files with zip is an absolutely miserable experience because you've got more overhead than you have content for instance. Because tar was designed for tape archive, its use-cases included backups which, for university computer, would be likely to include lots of small files. > tar doesn't checksum anything, there isn't even a CRC. It's not a CRC, but tar has a very simple checksum on headers: the 257 bytes of the header are summed into an integer.