From: Markus S. <mar...@gm...> - 2009-09-03 22:45:00
|
Similarly compact, with greater range: - Store 2 or 3 UChars (16-bit units) per transition, big-endian style, in a resource bundle *string*. - Read 2 UChars into an int64 t. - If the last bit (bit 0) is 1, then t=(t>>1)*60 (31 signed bits for minutes granularity). - Otherwise, read another UChar c, then t=(t<<15)|c (*47 signed bits for seconds granularity*) Smaller string padding in the .res file (compared with a binary) probably outweighs larger storage in the longer form, and the 47-bit range is large (+/- 2 million years). markus |