Project

bis

0.0
No commit activity in last 3 years
No release in over 3 years
Feed me.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
>= 0
 Project Readme

Bis

Gem Version [Build Status] (https://travis-ci.org/fuadsaud/bis) [Code Climate] (https://codeclimate.com/github/fuadsaud/bis)

A pure ruby immutable bitset implementation.

Installation

$ gem install bis

Usage

bis = Bis.new(8)  #=> <<00000000>> 0
bis.set(3)        #=> <<00001000>> 8
bis.set(3).set(2) #=> <<00001100>> 12
bis2 = bis.set(3).set(2).clear(3) #=> <<00000100>> 4
bis3 = bis2 << 4  #=> <<01000000>> 64
bis3 + 1          #=> <<1000001>> 65
bis3.concat(10)   #=> <<010000001010>> 1034

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Bitdeli Badge