/** * 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)); }
/** Write an {@code sint64} field, including tag, to the stream. */ public void writeSInt64(int fieldNumber, long value) throws IOException { writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); writeRawVarint64(encodeZigZag64(value)); }