-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I have been doing some maths and seems to me that 64bits numbers will need 10 bytes to represent them instead of 9 as we were talking about...
bytes = ceil(bits / 7)
7 bits / 7 = 1 byte
8 bits / 7 = 1.14 bytes -> 2 (+1 byte)
16 bits / 7 = 2.28 bytes -> 3
24 bits / 7 = 3.42 bytes -> 4
32 bits / 7 = 4.57 bytes -> 5
40 bits / 7 = 5.71 bytes -> 6
48 bits / 7 = 6.85 bytes -> 7
56 bits / 7 = 8 bytes
64 bits / 7 = 9.14 bytes -> 10 bytes (+2)
...
112 bits (14 bytes) / 7 = 16 bytes
120 bits (15 bytes) / 7 = 17.14 bytes -> 18 bytes (+3)
128 bits (16 bytes) / 7 = 18.28 bytes -> 19 bytes
And so on... I think the 64 bits version is wrong due to that, what do you think?
Metadata
Metadata
Assignees
Labels
No labels