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

Re: PakFiles



s369625@student.uq.edu.au wrote:

>>>1) The current PakFile format contains some redundant information, e.g.
[...]
>>>features for the contained files). Is it ok to remove that redundancy?

>>Hmm, I would have been more woried about the complexities of variable
>>sized data like filenames, but for whatever reason, I see no reason for

Hmmm, I think variable sized filenames are the best way. They are only read
once (when the archive is being mounted), so the speed loss isn't grave.
And having a fixed length would waste quite much space if we want to
support "long file names" (<= 255 chars). But we can store them Pascal-like
(i.e. by prepending them with a "length" byte (or word)).

Apropos "char" - just a weird idea popping up: How useful is Unicode
support for Filenames? Perhaps a Feature for Version 2?

>>>2) The current file format contains checksums for all data structures. They

>>Wise users might like a generic "check your Pakfiles" util.  That's the
kind >>of value added which is pointless for a single game to give, but
would be a nice >>benefit of an SDK like PPlay.  You don't need the

Hmm, yes, that's nice.

extensive checksums you >>were talking about  though.

Well, it's possible to detect critical errors in the pakfile structure
without using checksums, but for some fields (e.g. file names (if we
eliminate the redundancy),  file attributes in some special cases)
corruption can not reliably be detected. And for detecting corruption of
the contained files powerful checksums are required.

Bu I don't think we need much support for PakFile checking. It has to be
enough to ensure that all data needed on mounting is ok, but for everything
beyond that the game and decoder libs simply have to do their own error
checking.

>>>allow for both compress-then-encrypt and encrypt-then-compress. I think an
>>>additional "compressed-first" flag is appropriate for this. Comments?
>>Ok, but I would have thought compressing encrypted data would do shitall.

I thought the same, but apparently there are some such algos...

Cu
	Christian
--

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