summaryrefslogtreecommitdiff
path: root/src/bitops.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-03-29 15:58:44 +0100
committerantirez <antirez@gmail.com>2014-03-29 16:04:27 +0100
commit4628ac00650591777d34427fa7ee6d5f1f6c484e (patch)
tree252c38475fbc824c109b3eb71af4eb5f53691f42 /src/bitops.c
parent5317a582cf1a50f7be077e333eac3694d76a8d76 (diff)
downloadredis-4628ac00650591777d34427fa7ee6d5f1f6c484e.tar.gz
HyperLogLog internal representation modified.
The new representation is more obvious, starting from the LSB of the first byte and using bits going to MSB, and passing to next byte as needed. There was also a subtle error: first two bits were unused, everything was carried over on the right of two bits, even if it worked because of the code requirement of always having a byte more at the end. During the rewrite the code was made safer trying to avoid undefined behavior due to shifting an uint8_t for more than 8 bits.
Diffstat (limited to 'src/bitops.c')
0 files changed, 0 insertions, 0 deletions