The library the author is talking about selects between bitmap and array dynamically depending on density.

https://roaringbitmap.org/

That explains the maximum size of 4096 elements (exactly where a bitmap would be smaller).