Errors in the FAST 1.1 examples

Imported from previous forum

[ original email was from Mikael Brännström - m.brannstrom@ngm.se ]
Hi!

I have found a couple of errors in the examples in the FAST 1.1 spec dated 2006-12-20.

  1. Appendix 3.1.1, example 6.
    FAST Hex/Binary is “0x73 0x3f 0xff” but should be “0x7f 0x3f 0xff”. The binary version is correct.

  2. Appendix 3.1.5, example 8.
    FAST Hex/Binary Mantissa is “0x73 0x3f 0xff” but should be “0x7f 0x3f 0xff”. The binary version is correct.

  3. Appendix 3.2.3, example 2 “Copy Operator Example for NULL - Optional String”.
    The example contains the following template:

I think that encoding of the first absent value is wrong. Well, maybe it is not wrong since it decodes correctly but a more compact (and valid) encoding is possible. The first row in the example says that with no prior value in the dictionary the “none” value is encoded as “0x80” with pmap bit set to 1. I think the pmap bit should be set to 0 and the encoded value is “none”. The motivation for this can be found in section 6.3.5 “Copy Operator”.

When the value is not present in the stream there are three cases depending on the state of the previous
value:
[…]

  • undefined – […] If the field has optional presence and no initial value, the field is considered absent and the state of the previous value is changed to empty.
  1. Appendix 3.2.5, example 3. The input values are a little bit unclear in this decimal value example. The initial value is “12000” is normalized to 12e3 (scientific notation). It is unclear that the input values “12100”, “12150” and “12200” should mean 1210e1, 1215e1 and 1220e1 respectively. This can only be concluded by observing the encoded value, expecially for the last input value. I think the input value should be decomposed into exponent and mantissa as in appendix 3.1.5, examples 1 and 2.

Regards
Mikael