/** * Compute the number of bytes that would be needed to encode a {@code * uint64} field, including tag. */ public static int computeUInt64Size(int fieldNumber, long value) { return computeTagSize(fieldNumber) + computeRawVarint64Size(value); }
/** * Compute the number of bytes that would be needed to encode an {@code * int64} field, including tag. */ public static int computeInt64Size(int fieldNumber, long value) { return computeTagSize(fieldNumber) + computeRawVarint64Size(value); }
/** * Compute the number of bytes that would be needed to encode an {@code * sint64} field, including tag. */ public static int computeSInt64Size(int fieldNumber, long value) { return computeTagSize(fieldNumber) + computeRawVarint64Size(encodeZigZag64(value)); }