Question about: 4.1.1 Integer representation

Hello,
I have a pretty dumb question regarding integer representation isn't it easier to grasp expressed as binary masking and right shifts?
This should be the same
I % 128  becomes  I & 127
I / 128 becomes  I >> 7

And wouldn't it be way easier and faster to record/reconstruct such integers by moving all the flags (most significant bits) of each byte in front of the code?

I < 128
0xxxxxxx
I < 16.384
10xxxxxx xxxxxxxx  (compared to 1yyyyyyy 0yyyyyyy groups of 7 least significant bits first)
I < 2.097.152
110xxxxx xxxxxxxx xxxxxxxx  (compared to 1yyyyyyy 1yyyyyyy 0yyyyyyy groups of 7 least significant bits first)
I < 268.435.456
1110xxxx xxxxxxxx xxxxxxxx xxxxxxxx  (compared to 1yyyyyyy 1yyyyyyy 1yyyyyyy 0yyyyyyy groups of 7 least significant bits first)
…

Where xxx…xxx is simply the binary representation of I

The first part looks like unary coding and the overall form of this encoding is a 7, 7, ∞ start-step-code or a base 128 Elias γ′ code, do you really want to keep the universal nature of such a code or cap it?

Regards
-- 
Frédéric Kayser

Received on Friday, 18 October 2013 08:01:52 UTC