Skip to content

R.SETBIT

CategoryDescription
SyntaxR64.GETBITS key offset [offset1 offset2 ... offsetN]
Time complexityO(C)
Supports structuresBitmap64
Command descriptionRetrieves multiple values of the specified bit from a Roaring key.

Parameter

  • key: The name of the Roaring bitmap key.
  • offset: An integer that represents the offset of the bit to be set, with a value range of 0 ~ 2^64.

Output

  • If the operation is successful, the bit value is returned.
  • If the key does not exist, an empty array is returned.
  • Otherwise, an error message is returned.

Examples

Basic Usage

bash
$ redis-cli
127.0.0.1:6379> R64.SETINTARRAY foo 1 2 5 6
OK
127.0.0.1:6379> R64.GETBITS foo 2 3 4 5
(integer) 1
(integer) 0
(integer) 0
(integer) 1