Handles Redis bitmap commands: SETBIT, GETBIT, BITCOUNT, BITPOS, BITOP.
Each handler takes the uppercased command name, a list of string arguments, and an injected store map. Returns plain Elixir terms — the connection layer handles RESP encoding.
Bitmap commands operate on string values at the bit level. Bits are numbered from the most significant bit (MSB) of the first byte: bit 0 is the MSB of byte 0 (value 128), bit 7 is the LSB of byte 0 (value 1), bit 8 is the MSB of byte 1, and so on. This matches Redis bit ordering.
Since FerricStore uses an append-only Bitcask storage engine, all write operations (SETBIT, BITOP) perform a read-modify-write cycle.
Supported commands
SETBIT key offset value— set or clear the bit atoffset; returns old bitGETBIT key offset— returns the bit value atoffsetBITCOUNT key [start end [BYTE|BIT]]— count set bits in a rangeBITPOS key bit [start [end [BYTE|BIT]]]— find first 0 or 1 bitBITOP operation destkey key [key ...]— bitwise AND/OR/XOR/NOT
Summary
Functions
Handles a bitmap command.