Stream getTotalLength and zip file

Hi Jules,

I’ve modified

GZIPDecompressorInputStream and ZipFile.cpp so getTotalLength do not return -1 when the size can be known.


Ok… but how could you ever know that length? It might be wrong, depending on what’s in the stream.

Well, if the size in zip header is not the right one, then the zip file is broken,
so you’re going to have some issue anyway.
In both case you’ll not be able to read the right amount of data you were supposed to, so…

Ok, I guess for ZipFile it’s a useful thing to have.

Thanks Jules.