Skip to content

Redis RoaringA better compressed bitset

VitePress

Why Redis Roaring?

Traditional Redis bitmaps work great for dense data but can be memory-intensive and slow for sparse datasets. Redis Roaring combines the familiar Redis bitmap interface with the power of Roaring Bitmaps, giving you the best of both worlds.

The Problem with Traditional Bitmaps

bash
# Traditional Redis bitmap for user IDs 1, 1000000
SETBIT users:active 1 1
SETBIT users:active 1000000 1
# Result: ~256KB allocated for just 2 records!

The Redis Roaring Solution

bash
# Redis Roaring bitmap for the same data
R.SETBIT users:active 1 1
R.SETBIT users:active 1000000 1
# Result: ~13 bytes allocated

This project leverages the industry-standard CRoaring library, which powers bitmap operations

Contributes