HN2new | past | comments | ask | show | jobs | submitlogin

> Because tar does not support encryption/compression on the inside of archives.

Yes it does? Just encrypt/compress all the files before tarring.

> Not indexed

The reason tar doesn't have an index is so that tarballs can be concatenated. Also IIRC, you only have to jump through the headers for all files. Still O(n) where n is the number of files, but you don't have to scan through all of the data.



> The reason tar doesn't have an index is so that tarballs can be concatenated.

I'm curious, what's the use-case for this? Offhand, the only use for that ability I can think of is if I forgot a file in a tarball and have already deleted the originals; I can tar the missing file and cat the two tarballs.


Don't think files, think tapes. Tar stands for Tape ARchive and was originally primarily used for backing up to tapes. When working with tapes where deleteing and re-writing archives is basically impossible, concating an archive to the end of an already backed up archive to create a new, updated archive is very useful.


Ah, I see. Yes, that does sound very useful.


Compress before tarring is a really dumb idea and you will get terrible compression ratios - you cannot exploit data patterns across files. It could work if you ask gzip to write some sort of a global table...


You also make a bad block affect potentially every file following it. When if you compress pre-tar you could find the next file boundary and recover the rest.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: