On 07/17/03 19:41, Alan Horkan wrote:
> On Thu, 17 Jul 2003, Christopher Curtis wrote:
>> even resemble XML.  My "PREAMBLE" is valid XML.  If they implement what
>> they have written, they don't even bother with things like closing tags
>> or putting parameters in quotes.
> A preamble, which is effectively full XML file, a boundry then more
> information which is effectively another file.
> Two files in one file, sounds like an ad-hoc container to me.

As interesting as what I said was, I don't see how your comment
logically follows.  Anyway ...

> I only used Winzip as an example, there are several programs which can
> recover parts of zip files, so repairing damaged zip files is possible
> (although I cant guess how difficult it is do it).

This is something that shouldn't really be an issue.  The ZIP format
keeps the list of files at the end, so that if the file is clipped, the
directory is lost, and you can recreate it by scanning the archive for
delimiters.  The reason it can be repared at all is because the most
likely thing to get lost is the meta-information.

So, after some research, I've decided that ar is a fine container
format.  My only conribution, which you may take as you will, would be
to specify that the first entry in the archive is the descriptive
catalog.  Naturally I'm thinking the XML snippet I stated earlier, sans
the data offset thing.

The advantage to this is that you can detect if the file is corrupt, and
you have two ways or accessing data: via meta-information only, or via
the actual data entry.  This means there's no need to scan through the
archive to find its contents, and means that you can read the file using
more and it works fine (as long as the XML file is uncompressed).

The downside to using 'ar', really, is that WinZip doesn't support it.
I haven't verified this - I hope a Windows user can do so for us.  Just
for reference, attached below is a C&P of an ar archive I just made:

bash-2.05b$ echo 1 > file1
bash-2.05b$ echo 2 > file2
bash-2.05b$ ar r myar.xcf file*
bash-2.05b$ (echo --; cat myar.xcf; echo --)
file1/          1058492021  1000  1000  100644  2         `
file2/          1058492025  1000  1000  100644  2         `


Gimp-developer mailing list

Reply via email to