How to make rank and select queries run in constant O(1) time on bit vectors. A practical walkthrough with Zig code examples.