Re: Re: Deflate Encoding
mark W <[email protected]>
| Newsgroups | gmane.network.gnutella.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thanks for the reply. I have just checked the code and verified that it is with small 'd'. So, the process which I am doing is first check and parse the handshake replies if at all it has Content-Encoding-deflate, then only I am going into read stream in decompressed mode. API ---- I am using .Net based Api something like this: Byte [] buffer; // it has compressed data Byte[] deComp;//Decompressed data Stream streamObj = new System.IO.Compression.DeflateStream(new MemoryStream(buffer), CompressionMode.Decompress); streamObj.Read(deComp,0,buffer.Length); streamObj.close; Thus, Whenever the code is reaching at Read method it gives an exception as "Block Length does not match with its complement". I am still where am i doing wrong thing. Please suggest. Thanks in advance, Waugh [email protected] wrote: Quoting mark W <[email protected]> from ml.gnutella.dev-forum: : Thanks for the reply. :I have implemented asymetric compression means during first handshake, I am :adding Accept Encoding:Deflate That MUST be "deflate" with a lower-cased "d". : I am having the tough time here, when I get a response the a stream and further :if I try to decompress the stream i get an error. Well, 3 possibilities here: * You are not receiving compressed traffic. Did you make sure you got a "Content-Encoding: deflate" from the remote peer? * You have a bug in your inflating logic. * You are mis-using the inflate API. Raphael Send instant messages to your online friends http://uk.messenger.yahoo.com Send instant messages to your online friends http://uk.messenger.yahoo.com [Non-text portions of this message have been removed]