Are there any well-known libraries in Java for sparse bit vectors?
(And are there guidelines for how sparse is useful to use them vs. java.util.BitSet?)
TL;DR go here Efficient Sparse BitSet implementation in Java
I know this is an "old" question, but having the same question I stumbled across this post. While the answers are good, I was ultimately not satisfied. After further digging, I think I've come across the "definitive" answer to the question of sparse BitSets in Java.
In this presentation the author, Dr. Bruce Haddon, discusses the efforts of his researchers to create a highly memory-efficient and high-performance replacement for the standard Java BitSet.
The original links to his presentation are dead, but I contacted Dr. Haddon and have preserved both the code and presentation here:
https://github.com/brettwooldridge/SparseBitSet
I cannot recommend reading this presentation more highly. It is a fascinating read even if you have no interest in sparse bit sets, it is more about the true nature of problem solving...
Slides: Is it Computer Science, Software Engineering, or Hacking?