Stream getTotalLength and zip file


#1

Hi Jules,

I’ve modified

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

http://www.littlejourney.net/Juce/

Thanks,


#2

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


#3

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…


#4

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


#5

Thanks Jules.


#6