by Dan East » Oct 9, 2001 @ 7:46pm
When you seek in zlib, you decompress. So reading and seeking are the same performance-wise. Also, if you seek backwards, zlib resets to the beginning of the file, and decompresses all the way up to the new desired file pointer. That is why Pocket Quake loads gzipped data files so slow. So you might as well just read the whole file and count the bytes as you go to get the file size. If performance is an issue then you really should store the original file size, either in a custom header in the gzip, or in a seperate info file, etc.<br><br>Dan East