• Welcome to Valhalla Legends Archive.
 

[D2GS] Compressed clumps

Started by LivedKrad, October 16, 2005, 07:32 PM

Previous topic - Next topic

LivedKrad

Most of the messages that come in upon game join are clumped into one big message. I was wondering: does Battle.net buffer these packets together and then compress them? Or do they compress each packet and then add them to the buffer?

dxoigmn

You must buffer everything since packets may be fragmented by TCP. Another good question is, do compressed packet clumps always contain full packets? I don't know the answer but to be safe it would be wise to buffer this data as well. I suspect however that compressed packet clumps always contain full packets.

LivedKrad

You didn't answer my question at all.

Elneroth

I think he's saying that 'Yes', they buffer all the data before compressing because 'they' would have to, considering 'date is fragmented' in TCP.
^- If so, then yes, he did answer your question.

dxoigmn

Heh, I sort of misread your question. I'm pretty sure they clump them together and then compress the chunk because of the way huffman works. At least, it would be very wasteful to compress each packet individually and then append them together.

Talora

Battle.net compresses the file then runs them thru via their buffer.
I think that the world would be better if you would nerf all night elfs (-.-)

LivedKrad

Quote from: Talora on October 17, 2005, 09:00 PM
Battle.net compresses the file then runs them thru via their buffer.

Er?

Quote from: dxoigmn on October 17, 2005, 05:48 PM
Heh, I sort of misread your question. I'm pretty sure they clump them together and then compress the chunk because of the way huffman works. At least, it would be very wasteful to compress each packet individually and then append them together.

Much better. Thanks.

Joe[x86]

I'm rather sure they would compress each packet first, then join them. That reduces a lot of mess created by the way TCP has a habit of conjoining/splitting packets over the wire.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

dxoigmn

Quote from: Joe on November 05, 2005, 09:41 PM
I'm rather sure they would compress each packet first, then join them. That reduces a lot of mess created by the way TCP has a habit of conjoining/splitting packets over the wire.

Huh? When you receive data over the wire from the d2 game server a length header is sent first, thereby side stepping the issue you described.