Correct content byte info
This commit is contained in:
parent
8a3d17dd26
commit
f050be42f2
|
@ -108,22 +108,22 @@
|
|||
</thead>
|
||||
<tr>
|
||||
<td><code>0x42</code></td>
|
||||
<td>Compressed data</td>
|
||||
<td>Packed names, contains data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>0x43</code></td>
|
||||
<td>Compressed, no data</td>
|
||||
<td>Packed names, schema only</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>0x45</code></td>
|
||||
<td>Decompressed data</td>
|
||||
<td>Full names, contains data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>0x46</code></td>
|
||||
<td>Decompressed, no data</td>
|
||||
<td>Full names, schema only</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Decompressed packets contain an XML string. Compressed packets are what we're interested in here.</p>
|
||||
<p><small><i>I haven't seen <code>0x44</code>, so no idea what that one does, before you ask.</i></small></p>
|
||||
<p>The encoding flag indicates the encoding for all string types in the packet (more on those later). Possible
|
||||
values are:</p>
|
||||
<table>
|
||||
|
@ -234,9 +234,15 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<p>Structure names are encoded as densely packed 6 bit values, length prefixed (<code>nlen</code>). The acceptable
|
||||
alphabet is <code>0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz</code>, and the packed values
|
||||
are indecies within this alphabet.</p>
|
||||
<p>The encoding of structure names varies depending on the packet content byte. If the content flag indicates we have
|
||||
full names, then <code>nlen</code> will be masked with <code>0x40</code>. The string length is the unmasked value,
|
||||
+1 (0-length names make no sense anyway). We can then read off the correct number of bytes, and decode accordingly.
|
||||
</p>
|
||||
<p>If we are instead parsing packed names, then the names are encoded as densely packed 6 bit values. The length prefix
|
||||
(<code>nlen</code>) determines the length of the final unpacked string. The acceptable alphabet is
|
||||
<code>0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz</code>, and the packed values are indecies
|
||||
within this alphabet.
|
||||
</p>
|
||||
|
||||
<p>The children can be a combination of either attribute names, or child tags. Attribute names are represented by
|
||||
the byte <code>0x2E</code> followed by a length prefixed name as defined above. Child tags follow the above
|
||||
|
@ -366,7 +372,7 @@
|
|||
<td>8</td>
|
||||
<td>uint8[4]</td>
|
||||
<td>int</td>
|
||||
<td>4s16</td>
|
||||
<td>4u16</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -539,7 +545,7 @@
|
|||
<td>4</td>
|
||||
<td>uint16[2]</td>
|
||||
<td>int</td>
|
||||
<td>2s16</td>
|
||||
<td>2u16</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>0x33</td>
|
||||
|
@ -689,7 +695,7 @@
|
|||
<td>6</td>
|
||||
<td>uint16[3]</td>
|
||||
<td>int</td>
|
||||
<td>3s16</td>
|
||||
<td>3u16</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>0x3c</td>
|
||||
|
|
Loading…
Reference in New Issue