bit array compression.

Do you know an algorithm for compressing a bit array ? or ranges of a
bit array ?

Links, ideas, algos would be helpfull.