int size = computeRawVarint64Size(value); int offset = 0; byte[] buffer = new byte[tagSize + size];
final int size = computeRawVarint64Size(value); final int totalSize = tagSize + size;
@Override public void writeInt64(int fieldNumber, long value, boolean repeated) throws IOException { size += ProtobufOutput.computeRawVarint32Size(WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_VARINT)) + ProtobufOutput.computeRawVarint64Size(value); }
@Override public void writeUInt64(int fieldNumber, long value, boolean repeated) throws IOException { size += ProtobufOutput.computeRawVarint32Size(WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_VARINT)) + ProtobufOutput.computeRawVarint64Size(value); }
@Override public void writeSInt64(int fieldNumber, long value, boolean repeated) throws IOException { size += ProtobufOutput.computeRawVarint32Size(WireFormat.makeTag(fieldNumber, WireFormat.WIRETYPE_VARINT)) + ProtobufOutput.computeRawVarint64Size( ProtobufOutput.encodeZigZag64(value)); }