Re: [xml] gzdirect() doesn't work in zlib (at least) (was Re: libxml violates the zlib interface and crashes)

On Jan 22, 2010, at 9:54 AM, Nix wrote:
These results are inverted, so in, gzdirect() returns 0 even
when the input source file is not compressed at all. Oops?


Yes, oops.  This was already known.  The testing for now should be against the production version,, 
as Daniel has already done.  My next internal beta,, has the new gzdirect() fixed.  ( and 
beyond include a wholesale replacement of the gz* functions.)

The problem was that gzdirect() only reported correctly after you start reading the file (e.g. after a 
gzread()), which doesn't happen when you just do a gzopen().  gzdirect() now forces a file read when it 
immediately follows a gzopen() in order to determine if it's a gzip file or not.


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