Discussion Forums

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


Food for thought
Georges Gomes   23 Dec 2010 2:21AM ET
Encoding Strings in compact binary form
Mahesh Kumaraguru   26 Dec 2010 3:10PM ET
Re: Encoding Strings in compact binary form
Rolf Andersson / Pantor Engineering   28 Dec 2010 5:42PM ET
Byte versus bit optimization for HFT / FIX over FAST //
Mahesh Kumaraguru   2 Jan 2011 1:06AM ET
Re: Byte versus bit optimization for HFT / FIX over FAST //
Rolf Andersson / Pantor Engineering   2 Jan 2011 1:30AM ET
Re: Encoding Strings in compact binary form
Georges Gomes   5 Jan 2011 3:08AM ET
Re: Encoding Strings in compact binary form
Rolf Andersson / Pantor Engineering   5 Jan 2011 3:44AM ET
Re: Encoding Strings in compact binary form
Mahesh Kumaraguru   5 Jan 2011 4:04AM ET
Re: Encoding Strings in compact binary form
Georges Gomes   5 Jan 2011 4:26AM ET
Re: Food for thought
Vitali Vinokour / Lime Brokerage   28 Dec 2010 11:44AM ET
Re: Food for thought
Rolf Andersson / Pantor Engineering   28 Dec 2010 5:09PM ET
Re: Food for thought
Georges Gomes   5 Jan 2011 3:57AM ET
Flexibility versus performance
Mahesh Kumaraguru   11 Jan 2011 12:55AM ET
Re: Flexibility versus performance
Mark Reece / HSBC   11 Jan 2011 7:34AM ET
Re: Flexibility versus performance
Rolf Andersson / Pantor Engineering   11 Jan 2011 8:25AM ET
Re: Food for thought
alex o / self   30 Dec 2010 4:20PM ET
Re: Food for thought
Donald Mendelson / CME Group   30 Dec 2010 4:58PM ET
Re: Food for thought
Mark Sipos / FIX Flyer LLC   30 Dec 2010 5:17PM ET
Need for BodyLength on FIX messages over TCP Sockets
Mahesh Kumaraguru   30 Dec 2010 6:46PM ET
Re: Food for thought
Philip Beevers / Fidessa   4 Jan 2011 6:59AM ET
Re: Food for thought
Georges Gomes   5 Jan 2011 4:16AM ET
Re: Food for thought
Mahesh Kumaraguru   22 Jan 2011 2:03AM ET