code: private static void encodeInteger(ByteBuf out, int mask, int n, int i) {
          encodeInteger(out, mask, n, (long) i);
      }
docs: Encode integer according to <a href="https://tools.ietf.org/html/rfc7541#section-5.1">Section 5.1</a>.