4 ms·
If you only want to read then both zip and tar are good for this purpose. It's commonly used and known to work well. There are many formats that are really just
by diroussel 9y ago
If you only want to read then both zip and tar are good for this purpose. It's commonly used and known to work well. There are many formats that are really just a renamed zip file. Like jar, and epub. File entries don't have to be compressed so you can mmap.
If you want to do random writes then more consideration is needed.
- imron 9y ago> If you only want to read then both zip and tar are good for this purpose And programmatically accessing them is significantly more complicated than using SQLite which involves dropping a single header in your project and about 10 lines of code. > If you want to do random writes then more consideration is needed. Which you almost certainly what you want to do for the sorts of use cases where SQLite is also under consideration.
- dkersten 9y agowhich involves dropping a single header in your project and about 10 lines of code. 10 lines of user code + the sqlite library. Using other formats like zip is hardly any more user code (+ some external library).
- akx 9y agoAfaik, tar files do not contain a central directory, so finding a certain file in a tar file requires skimming through the entire archive.