Re: [xml] GZip OS version (minor issue)

In message <20011218021649 J9322 redhat com>
          Daniel Veillard <veillard redhat com> wrote:

On Mon, Dec 17, 2001 at 11:00:17AM +0000, Justin Fletcher wrote:

It seems that the GZip OS version code is hard-coded as 'unix' in to
xmlIO.c. Is there a reason for this ?

The reason I ask is that I would like to update this to use 0x0d (RISC OS),
rather than unix, to show the files lineage, rather than relying on the
default of 0x03 (Unix). I would prefer to set the variable in a header,
rather than modifying the C file itself.

It may be that this would have a bad effect of which I am unaware.

  Hum, that part of the code was contributed.
I could not find any description of those fields in the public zlib headers
so I would really prefer to not touch this unless it's broken.

Well, it's definately not broken. Probably best to leave it as it is.

For information, though (always useful to know what the code we have does
:-) ) :

It isn't in a public header with zlib (I don't know why; it just isn't).
In zlibs zutil.h file there are many different defines of 'OS_CODE' which
is set to the source OS number. The GZip file specification describes the
OS code on pages 7 and 8 (section 2.3.1) and states :

  This identifies the type of file system on which compression took place.
  This may be useful in determining end-of-line convention for text files.

Personally, I don't see that the OS code is a dictator of end ending
conventions, as the file being output might be binary and the encoder
(libxml2 in this case) can't help that. An earlier section describes a bit
which should be set in the flags to indicate text-like data.

At some point I may work out some form of patch for that section, but don't
see it as important - in particular, it'd be unwise to do until after you've
finished the API freeze and release process has completed.

Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.

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