Neo Kim @systemdesign.one · Jan 23

• Imagine Bluesky has only 100 users. • The index value of people I follow is set to 1 on the Bitmap. • The people I follow are found by walking the Bitmap and recording the index of non-zero bits. • A constant time lookup tells whether I follow a specific user; but inefficient for sparse data.

0 likes 1 replies

?

Replies

Neo Kim · Jan 23

• The data with a contiguous range of follows are stored using run-length encoding (RLE). • RLE turns consecutive 0s and 1s into numbers for reduced storage. • For example, if I follow last 10 users, only last 10 indices are marked by 1. With RLE, it’s stored as 90 0s and 10 1s.