Valhalla Legends Forums Archive | Battle.net Bot Development | [D2GS] Compressed clumps

AuthorMessageTime
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?
October 17, 2005, 12:32 AM
kamakazie
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.
October 17, 2005, 1:26 AM
LivedKrad
You didn't answer my question at all.
October 17, 2005, 9:47 PM
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.
October 17, 2005, 10:12 PM
kamakazie
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.
October 17, 2005, 10:48 PM
Talora
Battle.net compresses the file then runs them thru via their buffer.
October 18, 2005, 2:00 AM
LivedKrad
[quote author=Talora link=topic=13053.msg131402#msg131402 date=1129600816]
Battle.net compresses the file then runs them thru via their buffer.
[/quote]

Er?

[quote author=dxoigmn link=topic=13053.msg131372#msg131372 date=1129589312]
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.
[/quote]

Much better. Thanks.
November 4, 2005, 9:32 PM
JoeTheOdd
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.
November 6, 2005, 3:41 AM
kamakazie
[quote author=Joe link=topic=13053.msg133004#msg133004 date=1131248500]
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]

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.
November 6, 2005, 4:27 AM

Search