-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Execution Team 2021-06-28, Execution Team 2021-07-12
-
0
Add a "ZigZag" encoder for signed integers that stores the sign bit as the least significant bit. Two's complement is using the most significant bit resulting in a large bit difference for -1 vs 0.
With ZigZag, Simple-8b encoder does then not have to know about signed integers and can treat everything as unsigned.
For 32bit integers ZigZag encoding would look like this:
zigzag = (n << 1) ^ (n >> 31)
- is duplicated by
-
SERVER-57725 Simple-8b: Accept Signed Values
- Closed