|
|
@ -65,7 +65,7 @@ public class RoaringBitmap { |
|
|
|
int lenDiff = 0; |
|
|
|
int lenDiff = 0; |
|
|
|
if (sIdx1 > 0) { |
|
|
|
if (sIdx1 > 0) { |
|
|
|
byte b = value[sIdx0 - 1]; |
|
|
|
byte b = value[sIdx0 - 1]; |
|
|
|
byte b2 = (byte) (~(b & 0xff) >> sIdx1 << sIdx1 + ((b & 0xff) << (32 - sIdx1) >> (32 - sIdx1))); |
|
|
|
byte b2 = (byte) (b ^ (0xff - (int) Math.pow(2, eIdx1) + 1)); |
|
|
|
value[sIdx0 - 1] = b2; |
|
|
|
value[sIdx0 - 1] = b2; |
|
|
|
lenDiff += countInByte(b2) - countInByte(b); |
|
|
|
lenDiff += countInByte(b2) - countInByte(b); |
|
|
|
} |
|
|
|
} |
|
|
@ -75,7 +75,7 @@ public class RoaringBitmap { |
|
|
|
} |
|
|
|
} |
|
|
|
if (eIdx1 > 0) { |
|
|
|
if (eIdx1 > 0) { |
|
|
|
byte b = value[eIdx0]; |
|
|
|
byte b = value[eIdx0]; |
|
|
|
byte b2 = (byte) (((b & 0xff) >> eIdx1 << eIdx1) + ~(b & 0xff) << (32 - eIdx1) >> (32 - eIdx1)); |
|
|
|
byte b2 = (byte) (b ^ ((int) Math.pow(2, eIdx1) - 1)); |
|
|
|
value[eIdx0] = b2; |
|
|
|
value[eIdx0] = b2; |
|
|
|
lenDiff += countInByte(b2) - countInByte(b); |
|
|
|
lenDiff += countInByte(b2) - countInByte(b); |
|
|
|
} |
|
|
|
} |
|
|
|