Relative Content

Tag Archive for filearchive

Is there an file archive format that doesn’t rebuild the archive every time something is removed?

I’ve been looking into archive formats such as .zip and realised that it only adds files to the block serially, and then in cases where something is removed it has to rebuild the entire archive. This is in contrast with something like a database file, like SQLite (rebuilding the database every time something is removed wouldn’t be acceptable). Does anyone know of any formats that are a little more sophisticated than something like .zip, which as far as I can tell is basically serialising a whole bunch of different entries with headers, and then putting an index at the end? I’ve thought about writing my own, and the only thing I can think to do is to have use a virtual buffer class that I have that I use for memory block allocations, that keeps track of used and free memory blocks. I’m guessing .pak and .wad files used for game asset packaging work similar to .zip. Does anyone know how the asset archives work for major game engines such as Unreal and Unity when removing items?