Binary Atlas

Example of compression:
a)
<op><to>A</to><time s="9823989"/><id>move</id>
  <ent><id>foo</id>
    <loc><id>house_123</id><coords>12,4,2.9</coords></loc></ent></op>

b)
<op><to>A</to><time s="9823989.5"/><id>move</id>
  <ent><id>bar</id>
    <loc><id>house_123</id><coords>12,5.5,2.9</coords></loc></ent></op>

c)
<op><from>bar</from><to>A</to><time s="9823989.5"/><id>talk</id>
  <ent><attr name="say">Hi A</attr></ent></op>

    

    Binary compressed version might be something like this:
    

1) First byte is bitmask about what has remained same
2-3) id: String: width byte and actual bytes
4) time: double (or maybe char that gives difference to previous time)
5) op id: enum (short int at most)

move:
6) place id: see 2) (we are assuming ent here)
7-9) coords: see 3) (again assuming everything fits with standard move)

talk:
6) what has been said

If we have move or talk that differs from above format: specify all tags.

We send only changed parts, so lots of moves is only stream of ids of moving characters and their new coords. In addition of sending only differences compress resulting stream with some traditional compression algorithm.


   1)       2)  3) 4)        5)   6)  7) 8)  9)
a: 00000000     A  9823989   move foo 12 4   2.9
b: 11010101        9823989.5      bar    5.5
c: 01100000 bar              talk "Hi A"
Of course actual protocol will differ from above, but basic idea should be similar...

Somewhat related link: Differential X Protocol Compressor


Aloril
Last modified: Wed Jun 30 09:43:46 EEST 1999