1.getbit key offset:获取指定key对应偏移位上的Bit值

2.setbit key offset value:设置指定key对应偏移位上的bit值,value只能为0或1

3.Bitop op(and,or,not,xor) destkey key1[key2...]对指定key按位进行交,并,非,异或操作,并将结果保存到destkey中

4.bitcount key [start end]:统计指定key中1的数量

redis的bitmap,hyperloglog,geo数据结构
bitmap数据结构

 

hyperloglog是用来做基数(数据去重后元素个数)统计的,用了Loglog算法

pfadd key element...添加数据

pfcount key...统计数据

pfmerge destkey sourcekey...合并数据

redis的bitmap,hyperloglog,geo数据结构
geo数据结构

 

相关文章: