|
FAST Protocol
< Previous Next >
Mutually Exclusive Values in Set
Jacob Northey / The LaSalle Technology Group 6 Nov 2008 4:59PM ETMany times there are large groups of values which are mutually exclusive in a MultiValueString. The example field used, TradeCondition, is likely to have many mutually exclusive subsets of values.
The set extension should allow for a definition of these mutually exlusive fields. Let's use the 20 A* values for TradeCondition and assume that they are mutually exclusive. Only one of the A* values can be set at a time. Using a single bit for each value would require 3 bytes in the Set encoding. Using an option declaration this can be reduced to 5 bits.
<set name="TradeCondition">
<value>A</value>
<value>B</value>
<option presence="optional">
<value>AA</value>
<value>AB</value>
...
</option>
</set>
The presence attribute indicates whether null should be accepted as value or if the option should always be present. In this case:
00000 represents no value
00001 represents AA
00010 represents AB
The example above would take 1 byte in the worst case.
Mutually Exclusive Values in Set Jacob Northey / The LaSalle Technology Group 6 Nov 2008 4:59PM ET
|