lemire/javaewah — pull request #44 by gssiyankai (2014-09-07 22:30:14+00:00)
Title: Set bits in any order

This PR gives the ability to set bits in any order.

Previously, it was mandatory to set bits in stricly increasing order. For example, it was not possible to set the third bit to true on a bitmap with the fifth bit set to true by calling the set function. A workaround was to compute the bitwise or of the two bitmaps { 0, 0, 1, 0, 0 } and { 0, 0, 0, 0, 1 }.

The set function now accepts any bit index and is more efficient than the workaround. But such operation won't be free as the bitmap will have to be decompressed to find the correct running length word and potentially recompressed with adjacent running length words.