Redis native compressed bitmaps (redis-roaring)
The Issue & Context
Before this PR, Redis stored bitmaps as plain strings, which consume one byte per 8 bits up to the highest set bit, leading to large memory usage for sparse or large bitmaps.
Root Cause Analysis
The existing bitmap implementation used a dense string representation that allocated memory proportional to the highest bit offset, regardless of how many bits were set, lacking any compression or sparse representation mechanism.
Solution Strategy & Architectural Pattern
This PR integrates a native Roaring bitmap type (`OBJ_BITMAP` with `OBJ_ENCODING_BITMAP_ROARING`) backed by the vendored CRoaring library, enabling compressed storage of sparse and large bitmaps. It introduces a new config `bitmap-default-roaring` to enable automatic creation and conversion to Roaring bitmaps on writes, transparently supports bit commands on both representations, and adds a new RDB type for persistence using CRoaring's compact serialization format.
Key Takeaway for Contributors
Choosing a compressed bitmap data structure like Roaring can dramatically reduce memory usage for sparse bitmaps while preserving exact semantics, but requires careful integration with existing type systems, command compatibility, and persistence formats.