[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Format1 made easy
After some speculation on wheter there really wasn't an easier way to do
format 1 than what we are planning, I came up with this possible simpler
solution: Store dir info in the end of the file.
That way, if you want to add a file for a format 1 pak file, simply load the
pak info, write to the end of the file and write back the loaded pak info
along with info for the added file.
This is much simpler, since the exact same serialization method can be used
for both format 0 and format 1 paks this way. It also makes mounting MUCH
faster, since we don't have to ever reposition the drive read head, which is
very expensive, and can just do a simple serial read operation (perhaps only
ONE with caching), which is very inexpensive.
Performance might lag a little at writing format 1 paks if we have to
rewrite the ending information each time we want to add a file, but then we
can just make it possible to do format 1 pak writes in one go (can that
already be done? I'm not sure), so we only have to write it once.
Actually, that way, we both gets things simpler and more effecient.