docs: static int decodeInteger(ByteBuffer source, int n) throws HpackException {
          if (source.remaining() == 0) {
              return -1;
          }
          if(n >= PREFIX_TABLE.length) {
              throw UndertowMessages.MESSAGES.integerEncodedOverTooManyOctets(MAX_INTEGER_OCTETS);
          }
          int count = 1;
          int sp = source.position();
          int mask = PREFIX_TABLE[n];
  
          int i = mask & source.get();
          int b;
          if (i < PREFIX_TABLE[n]) {
              return i;
          } else {
              int m = 0;
              do {
                  if(count++ > MAX_INTEGER_OCTETS) {
                      throw UndertowMessages.MESSAGES.integerEncodedOverTooManyOctets(MAX_INTEGER_OCTETS);
                  }
                  if (source.remaining() == 0) {
                      //we have run out of data
                      //reset
                      source.position(sp);
                      return -1;
                  }
  
                  if(m >= PREFIX_TABLE.length) {
                      throw UndertowMessages.MESSAGES.integerEncodedOverTooManyOctets(MAX_INTEGER_OCTETS);
                  }
                  b = source.get();
                  i = i + (b & 127) * (PREFIX_TABLE[m] + 1);
                  m += 7;
              } while ((b & 128) == 128);
          }
          return i;
      }