Programmer Reference : Redis : EsRedisBitmapCommands
EsRedisBitmapCommands
Description
Provides an API for the Redis Bitmap commands. Bitmaps in Redis are not an actual data type, but a set of bit-oriented operations defined on the String type. Since strings are binary-safe blobs and their maximum length is 512 MB, they are suitable to store up to 2^32 different bits.
This command group is accessed via EsRedisClient>>bitmaps.
Class Methods
None
Instance Methods
bitcount:
  Count the number of set bits (population counting) in a string.
    
     Arguments:
        aKey - <String> The key of the string.
     Answers:
        <Integer> The number of bits set to 1.
        <EsFuture> In async mode, a future that completes with the result.
bitcount:start:end:
  Count the number of set bits in a string within a byte-level range.
    
     Arguments:
        aKey - <String> The key of the string.
        startInteger - <Integer> The starting byte index.
        endInteger - <Integer> The ending byte index.
     Answers:
        <Integer> The number of bits set to 1 in the specified range.
        <EsFuture> In async mode, a future that completes with the result.
bitfield:args:
  Perform arbitrary bitfield integer operations on a string.
    
     Arguments:
        aKey - <String> The key of the string.
        aCollectionOfArgs - <Collection> A collection of subcommands and their arguments (e.g., GET, SET, INCRBY).
     Answers:
        <Array> An array of results corresponding to the executed subcommands.
        <EsFuture> In async mode, a future that completes with the result.
bitfieldRo:args:
  Perform arbitrary read-only bitfield integer operations on a string.
    
     Arguments:
        aKey - <String> The key of the string.
        aCollectionOfArgs - <Collection> A collection of GET subcommands and their arguments.
     Answers:
        <Array> An array of results corresponding to the executed GET subcommands.
        <EsFuture> In async mode, a future that completes with the result.
bitop:destKey:keys:
  Perform bitwise operations between strings.
    
     Arguments:
        anOperation - <String> 'AND', 'OR', 'XOR', 'NOT'.
        aDestKey - <String> The destination key.
        aKeys - <Collection of String> The source keys.
     Answers:
        <Integer> The size of the string stored in the destination key.
        <EsFuture> In async mode, a future that completes with the result.
bitpos:bit:
  Find the first bit set to 1 or 0 in a string.
    
     Arguments:
        aKey - <String> The key of the string.
        aBit - <Integer> 0 or 1.
     Answers:
        <Integer> The position of the first bit set to the specified value.
        <EsFuture> In async mode, a future that completes with the result.
bitpos:bit:start:
  Find the first bit set to 1 or 0 in a string, starting from a given byte position.
    
     Arguments:
        aKey - <String> The key of the string.
        aBit - <Integer> 0 or 1.
        startInteger - <Integer> The starting byte index.
     Answers:
        <Integer> The position of the first bit set to the specified value.
        <EsFuture> In async mode, a future that completes with the result.
bitpos:bit:start:end:
  Find the first bit set to 1 or 0 in a string, within a given byte range.
    
     Arguments:
        aKey - <String> The key of the string.
        aBit - <Integer> 0 or 1.
        startInteger - <Integer> The starting byte index.
        endInteger - <Integer> The ending byte index.
     Answers:
        <Integer> The position of the first bit set to the specified value.
        <EsFuture> In async mode, a future that completes with the result.
getbit:offset:
  Returns the bit value at offset in the string value stored at key.
    
     Arguments:
        aKey - <String> The key of the string.
        anOffset - <Integer> The offset.
     Answers:
        <Integer> The bit value stored at offset.
        <EsFuture> In async mode, a future that completes with the result.
setbit:offset:value:
  Sets or clears the bit at offset in the string value stored at key.
    
     Arguments:
        aKey - <String> The key of the string.
        anOffset - <Integer> The offset.
        aValue - <Integer> 0 or 1.
     Answers:
        <Integer> The original bit value stored at offset.
        <EsFuture> In async mode, a future that completes with the result.
Last modified date: 01/22/2026