@Override
    public void writeInt32(int fieldNumber, int value, boolean repeated) throws IOException
    {
        if (value < 0)
        {
            tail = sink.writeVarInt64(
                    value,
                    this,
                    sink.writeVarInt32(
                            makeTag(fieldNumber, WIRETYPE_VARINT),
                            this,
                            tail));
        }
        else
        {
            tail = sink.writeVarInt32(
                    value,
                    this,
                    sink.writeVarInt32(
                            makeTag(fieldNumber, WIRETYPE_VARINT),
                            this,
                            tail));
        }

        /*
         * if(value < 0) { tail = writeTagAndRawVarInt64( makeTag(fieldNumber, WIRETYPE_VARINT), value, this, tail); }
         * else { tail = writeTagAndRawVarInt32( makeTag(fieldNumber, WIRETYPE_VARINT), value, this, tail); }
         */
    }
Resets this output for re-use.
protostuff-core/src/main/java/io/protostuff/ProtostuffOutput.java