dev@fi.java.net

Re: Bugs in Decoder.java

From: Arman Djusupov <arman_at_noemax.com>
Date: Tue, 03 Nov 2009 17:26:33 +0200

Hello Andrzej,

It seems that the decodeNumberOfItemsOfSequence() method indeed has a problem, since it doesn't add the lower boundary of the range after reading the value.

But why do you think that C.25.2 is implemented in the wrong way?

As far as I can see C.25.2 implementation is correct. It doesn't add +1 when reading 1-64 value range, because in the Java implementation the vocabulary tables are 0 based, so practically adding and subtracting 1 while reading/writing is not necessary. The same applies to other ranges. It adds 64 instead of 65 as lower boundary for medium ranged values and 8256 instead of 8257 for high ranged values.

With best regards,
Arman

> It looks like Decoder.decodeIntegerIndexOnSecondBit() implements C.25.2
> (from fastinfoset spec.) in the wrong way.
>
> I was wondering if there is anyone that could help us with fixing those
> issues or at least confirm that we interpret the specification (
> http://www.itu.int/rec/T-REC-X.891-200505-I) in the right way.
>
>
> Any help much appreciated.
> ~Andrzej
>