compressed data from an asynchronous socket !!

mark W <[email protected]>
Newsgroups gmane.network.gnutella.devel
Message-ID <[email protected]>
Hi All,

I could Inflates (uncompresses) the data in one go by following pseudo code using SharpZipLib.

////////////*********//////////
MemoryStream memStream = new MemoryStream(BytesInBuffer);
 memStream.Write(InputBuffer, 0, BytesInBuffer);
memStream.Seek(0, SeekOrigin.Begin);

InflaterInputStream str = new InflaterInputStream(memStream);
int i = str.Read(OutBuffer, 0, BytesInBuffer);
 ////////////*********//////////

This works one time decompression.

I want to Inflates for asynchronous Gnutella connection.When supernode keeps on sending data.At the same time i want to inflate each received block.
I have implemented it using BeginReceive and EndReceive so as not to block when waiting for data from the supernode.

how can i inflate asynchronous data ?

thanks in advance ,
* Mark


Send instant messages to your online friends http://uk.messenger.yahoo.com 

[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.