Encoding Strings in compact binary form
Mahesh Kumaraguru <>
26 Dec 2010 3:10PM ET
Hi Georges,
I read thru the section "Encode Fields in compact binary form" and wanted to get a clarification. On pages 25/48 and 26/48, for all formats other than String, the length of the value in bytes is known from the value of the "TBD" 7 bits. But in case of String, the parser will know its a String value, but would not know the length of the String and hence where next Field header starts.
In the 1 byte field header, presently 1st bit indicates the number of bytes for tag and 2nd to 8th bits is value encoded format.
For 2nd to 8th bits instead if we use as follows, the "Encoding Strings in compact binary form" problem could be solved with some limitations.
2nd bit indicates datatype
0 = String datatype
1 = Numeric datatype
3rd to 8th bits -
when 2nd bit = 0, these bits represent the length of String value i.e. 63 char long String values can be encoded.
when 2nd bit = 1, these bits represent one of the TBD values for numeric datatypes whose length is known.
Thus after reading and parsing a field header, the decoder knows exactly how many bytes forward to read for this field (tag + value) and how to interpret the value.
Regards,
K. Mahesh
> Hi All,
>
> As discussed during last meeting.
> Please find hereafter some ideas for the working group.
>
> http://www.slideshare.net/GeorgesGomes/ullink-analysis-and-proposal-for-fix-hft-december-2010
>
> Feel free to comment on this forum thread.
>
> Kind regards
> Merry Christmas
> Georges