4 ms·
A tar file doesn't have a central directory like a zip, so you do have to search all the file headers. However, each file header contains the length of the file
by yuubi 10y ago
A tar file doesn't have a central directory like a zip, so you do have to search all the file headers. However, each file header contains the length of the file it describes, which lets you seek past the content of any files you don't care about if the tar isn't stored in a way that would prevent seeking.
- Skunkleton 10y agoThat would work if your tar was uncompressed. The lengths in the tar are meaningless in a compressed file.
- shawnz 10y agoThat's not true, xz allows efficient decompression of arbitrary byte ranges inside the file.
- Skunkleton 10y agoDoes it let you seek by a decompressed byte count, or or does it let you decode arbitrary compressed byte ranges?