public static void writeRawVarInt32Bytes(DataOutput out, int value) throws IOException
    {
        while (true)
        {
            if ((value & ~0x7F) == 0)
            {
                out.write(value);
                return;
            }
            else
            {
                out.write((value & 0x7F) | 0x80);
                value >>>= 7;
            }
        }
    }
Encode and write a varint to the {@link DataOutput}
protostuff-core/src/test/java/io/protostuff/CodedOutput.java