W3C home > Mailing lists > Public > public-exi-comments@w3.org > September 2008

[EXI LC comments] Date-Time alignment on binary

From: Innovimax SARL <innovimax@gmail.com>
Date: Fri, 19 Sep 2008 20:18:36 +0200
Message-ID: <546c6c1c0809191118j6f994743jc140ea97a5dc0dfc@mail.gmail.com>
To: public-exi-comments@w3.org

Dear,

In 7.1.8 Date-Time

You choose to encode Date-Time, the following way

Year                    Offset from 2000
Integer ( 7.1.5 Integer)
MonthDay        Month * 32 + Day                                        9-bit
Unsigned Integer (7.1.9 n-bit Unsigned Integer) where day is a value
in the range 1-31 and month is a value in the range 1-12.
Time            ((Hour * 60) + Minutes) * 60 + seconds  17-bit Unsigned
Integer (7.1.9 n-bit Unsigned Integer)
FractionalSecs  Fractional seconds      Unsigned Integer ( 7.1.6 Unsigned
Integer) representing the fractional part of the seconds with digits
in reverse order to preserve leading zeros
TimeZone        TZHours * 60 + TZMinutes        11-bit Unsigned
Integer (7.1.9 n-bit
Unsigned Integer) representing a signed integer offset by 840 ( = 14 *
60 )
presence        Boolean presence indicator      Boolean (7.1.2 Boolean)




Since you have aligned MonthDay on 5 bits with <<Month * 2^5 + Day>>
I propose to align the Hour/Minute/Seconds on 6 bits

with

Time :  (Hour * 2^6 + Minutes) * 2^6 + seconds so as to replace
multiplication by 60 with SHL
and
TimeZone : TZHours * 2^6 + TZMinutes

Regards,

Mohamed ZERGAOUI

-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Friday, 19 September 2008 18:19:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 19 September 2008 18:19:11 GMT