code: public MessagePacker packBigInteger(BigInteger bi)
              throws IOException
      {
          if (bi.bitLength() <= 63) {
              packLong(bi.longValue());
          }
          else if (bi.bitLength() == 64 && bi.signum() == 1) {
              writeByteAndLong(UINT64, bi.longValue());
          }
          else {
              throw new IllegalArgumentException("MessagePack cannot serialize BigInteger larger than 2^64-1");
          }
          return this;
      }
docs: Writes an Integer value.
  
  <p>
  This method writes an integer using the smallest format from the int format family.
  
  @param bi the integer to be written
  @return this
  @throws IOException when underlying output throws IOException