You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why use a 0~1 random number to multiple 0x7FFF FFFF FFFF FFFF as a limitation? (63bits)
WHY NOT using 0xFFFF FFFF FFFF FFFF? (64bits)
AND otherwise ...
the code for sInt64 codec test:
var limit = 0xfffffffffffff;
It's 54bits.
But for signed int 64bit, because it's been multiple 2 inside the encode function, the limit should be 0x3FFF FFFF FFFF FFFF. (62bits, the head bit for sign, second bit for *2).
So, is there any limitation on UInt64 / SInt64 codec?
I've tested on my Objective-C codec. 0xFFFF...(64bits) works fine on UInt64, and 0x3FFF...(62bits) works find on SInt64.
The text was updated successfully, but these errors were encountered:
https://github.com/pomelonode/pomelo-protobuf/blob/master/test/codecTest.js
as the code for
uInt64
codec test:Why use a 0~1 random number to multiple 0x7FFF FFFF FFFF FFFF as a limitation? (63bits)
WHY NOT using 0xFFFF FFFF FFFF FFFF? (64bits)
AND otherwise ...
the code for
sInt64
codec test:It's 54bits.
But for signed int 64bit, because it's been multiple 2 inside the encode function, the limit should be 0x3FFF FFFF FFFF FFFF. (62bits, the head bit for sign, second bit for *2).
So, is there any limitation on UInt64 / SInt64 codec?
I've tested on my Objective-C codec. 0xFFFF...(64bits) works fine on UInt64, and 0x3FFF...(62bits) works find on SInt64.
The text was updated successfully, but these errors were encountered: