I've been reading up on gamma codes. I see where they get the unary codes from the decimal but not where the length & offset comes from. I also understand that the gamma code is just the length (of the unary code) concatenated with the offset.
777 in binary code is 1100001001
Gamma code
VB code
In esence, VB code splits the gap (in binary) into 7 bit partitions and set the continuation bit/1st bit of last/right most 7 bits part to 1 and all other parts's continuation bit to 0.
00000110 10001001
(start to fill 7 bytes if you did not finish put 1
on the 8th bit else 0
)1111111110100001001
100001001
1111111110
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With