< Previous Next >
Re: delta operator for uInt
Rolf Andersson / Pantor Engineering
29 Jun 2012 4:24AM ET
it should obviously be [signed] not [unsigned] in:
"1. The delta value is represented as a [signed] Integer."
> Hi Justin,
> I believe your interpretation is correct.
> It is documented in the FAST 1.1 specification.
> Section 22.214.171.124:
> "The delta value is represented as an Integer Delta in the transfer encoding. The combined value is the sum of the base and delta values.
> The default base value for integers is 0."
> 1. The delta value is represented as an [unsigned] Integer.
> 2. The default base value for integers is 0 [zero].
> Section 10.5.1:
> "The delta operator has the following presence map utilization:
> • Mandatory integer, decimal, string and byte vector fields – no bit.
> • Optional integer, decimal, string and byte vector fields – no bit. The delta appears in the stream in a nullable representation. A NULL indicates that the delta is absent. Note that the previous value is not set to empty but is left untouched if the value is absent."
> 1. The delta appears .. in a nullable representation.
> 2. ... the previous value .. is left untouched if the value is absent.
> Section 10.6.1:
> "Integers are represented as stop bit encoded entities. An integer is overlong if the entity value still represents the same integer after removing seven or more of the most significant bits. Unless the integer is used as a block size, it is a reportable error [ERR R6] if an overlong integer number appears in the stream.
> If an integer is nullable, every non-negative integer is incremented by 1 before it is encoded. The NULL representation of a nullable integer is a 7-bit entity value where all bits are zero."
> 1. ... every non-negative integer is incremented by 1 before it is encoded.
> Hope this helps,
> > Hi all!
> > There are several threads about delta operator for uInt, but I found none with the exact/comprehensive decoding algorithm.
> > Here is what I understood:
> > - if the field is not optional, there is no NULL representation, and decoded_value = base_value + encoded_delta_value
> > - if the field is optional, then 0 is the representation of NULL and
> > a. if encoded_delta_value = 0, field is not present
> > b. if encoded_delta_value < 0 then decoded_value = base_value + encoded_delta_value
> > c. if encoded_delta_value > 0 then decoded_value = base_value + encoded_delta_value - 1
> > Is that right ?
> > If yes where is it specified exactly?
> > (P.S: I found several docs/tutorials where either
> > - the final -1 in case of optional fields and encoded_delta_value > 0 was not described
> > - it was said that decoding was the same for optional or non-optional fields and that encoded_delta_value = 0 for non-optional field was an error
> > ==> so I begin to be lost...)
> > Thanks a lot,
> > Julien
Re: delta operator for uInt
Rolf Andersson / Pantor Engineering 29 Jun 2012 4:24AM ET