As you say the stream can't know it's size so the usual strategy for reading from a stream won't work. I found this SO solution
http://stackoverflow.com/questions/1528508/uncompress-data-file-with-deflatestream[
^].
Inside an "infinite" loop you keep reading:
using (DeflateStream inflation = new DeflateStream(stream, CompressionMode.Decompress, true))
{
byte[] buffer = new byte[BUF_SIZE];
while(true)
{
int lengthRead = inp.Read(buffer, 0, buffer.Length)
if(lengthRead <= 0)
break;
}
}
BUF_SIZE is the size of the buffer you want to use. I haven't used this before, so apologies in advance if it fails (can't test right now) but hopefully this should get you re-started.