function encodingLength(i) {
  return i < OPS.OP_PUSHDATA1 ? 1 : i <= 0xff ? 2 : i <= 0xffff ? 3 : 5;
}
Calculates the encoding length of a number used for push data in Bitcoin transactions.
@param i The number to calculate the encoding length for.
@returns The encoding length of the number.