bs.writeBits(BigInteger.TEN, 8);
data = bs.toByteArray();
assertEquals(3, data.length);
assertEquals(Byte.SIZE * 3, bs.available());
assertEquals(130, bs.bytes());
bs.goToWriteFromBeginning();
bs.writeBits(BigInteger.ZERO, 8);
bs.writeBits(BigInteger.ZERO, 8);
data = bs.toByteArray();
assertEquals(0, data[0]);
assertEquals(0, data[1]);