• A
    HyperLogLog internal representation modified. · 4628ac00
    antirez 提交于
    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.
    4628ac00
hyperloglog.c 18.8 KB