OptionalendThe ending offset index. Optional since Valkey version 8.0 and above for the BITCOUNT command.
If not provided, it will default to the end of the string.
Could be defined only if start is defined.
OptionalindexThe index offset type. This option can only be specified if you are using server version 7.0.0 or above. Could be either BitmapIndexType.BYTE or BitmapIndexType.BIT. If no index type is provided, the indexes will be assumed to be byte indexes.
The starting offset index.
Represents offsets specifying a string interval to analyze in the bitcount and bitpos commands. The offsets are zero-based indexes, with
0being the first index of the string,1being the next index and so on. The offsets can also be negative numbers indicating offsets starting at the end of the string, with-1being the last index of the string,-2being the penultimate, and so on.If you are using Valkey 7.0.0 or above, the optional
indexTypecan also be provided to specify whether thestartandendoffsets specifyBITorBYTEoffsets. IfindexTypeis not provided,BYTEoffsets are assumed. IfBITis specified,start=0andend=2means to look at the first three bits. IfBYTEis specified,start=0andend=2means to look at the first three bytes.See
bitcount and bitpos for more details.