| ▲ | nrclark 3 hours ago | |||||||||||||||||||||||||
You only have to decompress it first if it's compressed (commonly using gzip, which is shown with the .gz suffix). Otherwise, you can randomly access any file in a .tar as long as: - the file is seekable/range-addressible - you scan through it and build the file index first, either at runtime or in advance. Uncompressed .tar is a reasonable choice for this application because the tools to read/write tar files are very standard, the file format is simple and well-documented, and it incurs no computational overhead. | ||||||||||||||||||||||||||
| ▲ | electroly 2 hours ago | parent | next [-] | |||||||||||||||||||||||||
You've just constructed your own crappy in-memory zip file, here. If you have to build your own custom index, you're no longer using the standard tools. If you find yourself building indices of tar files, and you control the creation, give yourself a break and use a zip file instead. It has the index built in. Compression is not required when packing files into a zip, if you don't want it. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | kevin_thibedeau 26 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||
Romfs is more capable, simple to support, and doesn't have the overhead of tar's large headers and typical large blocking factors. | ||||||||||||||||||||||||||
| ▲ | johannes1234321 2 hours ago | parent | prev [-] | |||||||||||||||||||||||||
> Uncompressed .tar is a reasonable choice for this application Yes, uncompressed tar (with transfer compression, which is offered in HTTP) is an option for some amount of data. Till the point where it isn't. zip has similar benefits as tar(+transfer compression) but a later point where it fails for such a scenario. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||