Bis
A pure ruby bitset implementation.
Installation
$ gem install bis
Usage
bis = Bis.new(8) #=> <<00000000>> 0
bis.set(3) #=> <<00001000>> 8
bis.set(3).set(2) #=> <<00001010>> 10
bis2 = bis.set(3).set(2).clear(3) #=> <<00000010>> 2
bis3 = bis2 << 4 #=> <<00100000>> 32
bis3 + 1 #=> <<0010000001>> 65
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request



