This library provides an indexing system for bitvectors which should hopefully allow fast rank and select operations.
This library is based on the design proposed by Zhou, Andersen and Kaminsky in Space–Efficient, High–Performance Rank & Select Structures on Uncompressed Bit Sequences.
I think there is an implementation of the same approach in a Haskell succinct vector library.
Zhou, Andersen and Kaminsky. Space–Efficient, High–Performance Rank & Select Structures on Uncompressed Bit Sequences