Bitmap
BITOP
Perform bitwise operations between strings.
The BITOP
command in Redis is used to perform bitwise operations on multiple keys (or Redis strings) and store the result in a destination key. It is primarily used for performing logical AND, OR, XOR, and NOT operations on binary data stored in Redis.
Arguments
operation
AND | OR | XOR | NOT
requiredSpecifies the type of bitwise operation to perform, which can be one of the
following: AND
, OR
, XOR
, or NOT
.
destkey
str
requiredThe key to store the result of the operation in.
keys
*List[str]
requiredOne or more keys to perform the operation on.
Response
The size of the string stored in the destination key.