Strange error when loading .egg.pz

Hi,

I’m getting this error when trying to pview/load an .egg.pz file:

Loading models/ralph.egg.pz
:egg2pg: Reading models/ralph.egg.pz
:express(warning): zlib error in inflate: Z_DATA_ERROR = invalid distance too far back
:express(warning): zlib error in inflate: Z_DATA_ERROR = invalid distance too far back

Error in models/ralph.egg.pz at line 159, column 36:
        <UV> { 0.278306 0.2:0.805149 }
                                   ^
syntax error

:egg2pg(error): Error reading models/ralph.egg.pz
:loader(error): Couldn't load file models/ralph.egg.pz: invalid.
Unable to load models/ralph.egg.pz

I’m using the CVS version from a few days ago.
If I first punzip it it works fine. If I then pzip it again it fails.

Oops, that was my bad. Good catch! The code was incorrectly applying a newline conversion to the file before attempting to unzip it implicitly, which of course was corrupting the binary compressed data.

I’ve just checked in a fix, in panda/src/express/virtualFileSystem.cxx. This won’t be a problem for the 1.5 series, though, since it was caused by the code I only recently introduced.

David

Thanks again! Works great now.