bs.writeBits(BigInteger.ONE, 8);
bs.setWriteMark();
bs.writeBits(BigInteger.TEN, 8);
assertEquals(Byte.SIZE * 2, bs.available());
assertEquals(2, bs.bytes());
byte[] data = bs.toByteArray();
assertEquals(2, data.length);
assertEquals(1, data[0]);
assertEquals(10, data[1]);
bs.goToWriteMark();
bs.writeBits(BigInteger.ZERO, 8);