Bitmaps

Bit-level operations on string values: set, get and count bits, find the first set or clear one, and combine bitmaps.

7 commands in KiviDB 1.1.2. Every command.

  • BITCOUNT: Counts the bits set to 1 in the string at key, or in a part of it.
  • BITFIELD: Reads, writes and increments integers of any width from 1 to 64 bits, stored at any bit offset of the string at key, in one command.
  • BITFIELD_RO: BITFIELD with GET only: it only reads, so it can be sent to a read-only replica.
  • BITOP: Combines the strings at the source keys bit by bit and stores the result at destkey.
  • BITPOS: Returns the position of the first bit set to bit (0 or 1) in the string at key, or in a part of it.
  • GETBIT: Returns the bit at offset in the string at key.
  • SETBIT: Sets or clears the bit at offset in the string at key.