Skip to content

R64.SETBIT

CategoryDescription
SyntaxR64.GETBIT key offset
Time complexityO(1)
Supports structuresBitmap64
Command descriptionRetrieves the value 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^32.

Output

  • If the operation is successful, a value of 0 or 1 is returned.
  • Otherwise, an error message is returned.

Examples

Basic Usage

bash
$ redis-cli
127.0.0.1:6379> R64.SETBIT foo 0 1
(integer) 0
127.0.0.1:6379> R64.GETBIT foo 0
(integer) 1