code: public void encodeUnsignedInteger(int n) throws IOException {
  		if (n < 0) {
  			throw new UnsupportedOperationException();
  		}
  
  		if (n < 128) {
  			// write byte as is
  			encode(n);
  		} else {
  			final int n7BitBlocks = MethodsBag.numberOf7BitBlocksToRepresent(n);
  
  			switch (n7BitBlocks) {
  			case 5:
  				encode(128 | n);
  				n = n >>> 7;
  			case 4:
  				encode(128 | n);
  				n = n >>> 7;
  			case 3:
  				encode(128 | n);
  				n = n >>> 7;
  			case 2:
  				encode(128 | n);
  				n = n >>> 7;
  			case 1:
  				// 0 .. 7 (last byte)
  				encode(0 | n);
  			}
  		}
  	}
docs: Encode an arbitrary precision non negative integer using a sequence of
  octets. The most significant bit of the last octet is set to zero to
  indicate sequence termination. Only seven bits per octet are used to
  store the integer's value.