[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PakFiles



Eelke Klein wrote:

>> >>1) The current PakFile format contains some redundant information, e.g.

>We are not implementing a mission critical database so data 
>recovery is a bit overkill. Instead I would optimize the 
>data structure for speed, which may require some redundant 
>data. 

Well, the entire pakfile structure is processed when the pakfile is being
mounted and speed usually isn't important then. Speed is mainly important
at "file opening" time, i.e. when the file access mechanism does the
"filename -> offset-in-pakfile" resolution.

What we can do here is (as proposed by Dan) to provide the possibility to
access files by number instead of by filename. That way it is possible to
skip the slow filename parsing stage at speed critical times.
This needs some more design work, though, as the game programmes has to
know what file has which number. 
Perhaps via some 
int NumberOfFile (const char *FileName);
function. This way numerical IDs can also be used for accessing files in
third-party PakFiles or Addons released later...

Cu
	Christian
--

I am Yeti of Borg - U will b asssmsh...  assishe... as