> 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.
This was a joke? Uncompressing 800kb file isn't a matter of milliseconds on low-end SimCoupe machines (200MHz CPU). And seeking = uncompressing, so I suppose you would rather directly uncompress it to a memory buffer, and then read it from that buffer. > 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. Obviously. Seeking in compressed stream is something ***consored***. > Si Aley

