Re: compressed data from an asynchronous socket !!
| Newsgroups | gmane.network.gnutella.devel |
|---|---|
| Organization | Home, Grenoble, France |
| Message-ID | <[email protected]> |
Quoting mark W <[email protected]> from ml.gnutella.dev-forum: :Is there a way in Gnutella protocol that tells :in advance how long a single compressed block of data will be? You don't get it, do you? There is NO SINGLE COMPRESSED BLOCK. It's a continuous stream of compressed data. Among this stream, there are messages, but the messages can only be reconstructed from the DEFLATED stream. Imagine a single Gnutella message, say a PING, that would be set 100 times in a row. A deflate algorithm could very well compress that a lot and send the message only once (with some added information to know that it has to be repeated 100 times). Now of course, deflate is not working exactly like that, but this is to show you that there is no way to determine anything about the underlying Gnutella messages by solely looking at the compressed stream. Messages are not compressed individually on a TCP connection that is deflated. It's the stream of data that make up the traffic that gets deflated. Individual message compression only happens on UDP exchanges, but it is only supported by gtk-gnutella currently, even though the specs are open. Raphael