int getNextSet(int from) { for (int i = from; i < size; i++) { if (bits[i] != 0) return i; } return size; }