4 ms·
Or just what zip and every other format does an skits put all the metadata at the beginning - enough to list all files, and extract any single one efficiently
by TylerE 3y ago
Or just what zip and every other format does an skits put all the metadata at the beginning - enough to list all files, and extract any single one efficiently
- nullindividual 3y agoTapes don't (? certainly didn't) operate this way. You need to read the entire tape to list the contents. Since tar is a Tape ARchive, the way tar operates makes sense (as it was designed for both output to file and device, i.e. tape).
- monocasa 3y agoTapes currently don't really operate like tar anymore either. Filesystems like LTFS stick the metadata all in one blob somewhere.
- nullindividual 3y agoIt's been a long time since I've operated tape, so good to know things have changed for the better.
- tredre3 3y agoThat point is always raised on every criticism of tar (that it's good at tape). Yes! It is! But it's awful at archive files, which is what it's used for nowadays and what's being discussed right now. Over the past 50 years some people did try to improve tar. People did develop ways to append a file table at the end of an archive file. Maintaining compatibility with tapes, all tar utilities, and piping. Similarly, driven people did extend (pk)zip to cover all the unix-y needs. In fact the current zip utility still supports permissions and symlinks to this day. But despite those better methods, people keep pushing og tar. Because it's good at tape archival. Sigh.
- monocasa 3y agozip interestingly sticks the metadata at the end. That lets you add files to a zip without touching what's already been zipped. Just new metadata at the end. Modern tape archives like LTFS do the same thing as well.
- t43562 3y agoThat sounds like you need to have fetched the whole zip before you can unzip it - which is not what one wants when making "virtual tarfiles" which only exist in a pipe. (i.e. you're packing files in at one end of the pipe and unpacking them at the other)
- bdhcuidbebe 3y agoJust fseek to the end. Zip format was not designed for piping.