code: public void encodeNBitUnsignedInteger(int b, int n) throws IOException {
  		if (b < 0 || n < 0) {
  			throw new IllegalArgumentException(
  					"Encode negative value as unsigned integer is invalid!");
  		}
  		assert (b >= 0);
  		assert (n >= 0);
  
  		ostream.writeBits(b, n);
  	}
docs: Encode n-bit unsigned integer. The n least significant bits of parameter
  b starting with the most significant, i.e. from left to right.