BitArray is based on the Ruby library BitArray by Peter Cooper (https://github.com/peterc/bitarray).
Create a bit array 1000 bits wide:
var ba = 1000;
Setting and reading bits:
ba;ba; // => 1ba;ba; // = > 0
var ba = 20;1359111315;ba; // => "01010100010101010000"
total_set method is not ported for now.
There might be bugs, this is just a quick port. Non-sucky tests would be awesome. hinthint (The test file from the original repo https://github.com/peterc/bitarray/blob/master/test/test_bitarray.rb should be ported.)
MIT licensed. Copyight 2012 Thomas Fuchs, yada yada. Original library: Copyright 2007-2012 Peter Cooper, yada yada.