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的数量
![](https://i-blog.csdnimg.cn/blog_migrate/09a616ff822bdcad9a906eb91e5034e1.png)
hyperloglog是用来做基数(数据去重后元素个数)统计的,用了Loglog算法
pfadd key element...添加数据
pfcount key...统计数据
pfmerge destkey sourcekey...合并数据
![](https://i-blog.csdnimg.cn/blog_migrate/9fe9fd0c366bd290e0472610273b88d1.png)