/** * Compute the number of bytes that would be needed to encode an {@code * sint32} field, including tag. */ public static int computeSInt32Size(int fieldNumber, int value) { return computeTagSize(fieldNumber) + computeRawVarint32Size(encodeZigZag32(value)); }
/** Write an {@code sint32} field, including tag, to the stream. */ public void writeSInt32(int fieldNumber, int value) throws IOException { writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); writeRawVarint32(encodeZigZag32(value)); }