Aley Keprt wrote:
> Yes, I suppose this feature has gone when you added GZip 
> support where you don't know the size of uncompressed image.

Well, for a general size test you could gzseek to a position large
enough to cover the files you're likely to be handling, and see what it
returns as the offset.  It'll probably be as expensive as uncompressing
the file up to that position, but isn't too bad for smallish files and
infrequent tests.

Or to test for a specific size just seek to it and make sure you can't
read 1 byte more.  I ended up having to use that method for the CStream
base class, but with a read instead of the seek since the ZIP
implementation I'm using doesn't support seeking.

Si

Reply via email to