code: public void encodeInteger(int n) throws IOException {
  		// signalize sign
  		if (n < 0) {
  			encodeBoolean(true);
  			// For negative values, the Unsigned Integer holds the
  			// magnitude of the value minus 1
  			encodeUnsignedInteger((-n) - 1);
  		} else {
  			encodeBoolean(false);
  			encodeUnsignedInteger(n);
  		}
  	}
docs: Encode an arbitrary precision integer using a sign bit followed by 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.