public static long parseLong(@org.jetbrains.annotations.NotNull @NotNull RandomDataInput in, long offset) throws BufferUnderflowException { long num = 0; boolean negative = false; while (true) { int b = in.peekUnsignedByte(offset++); // if (b >= '0' && b <= '9') if ((b - ('0' + Integer.MIN_VALUE)) <= 9 + Integer.MIN_VALUE) num = num * 10 + b - '0'; else if (b == '-') negative = true; else if (b != '_') break; } return negative ? -num : num; }