public static byte[] getRawVarInt32Bytes(int value)
    {
        int size = computeRawVarint32Size(value);
        if (size == 1)
            return new byte[] { (byte) value };

        int offset = 0;
        byte[] buffer = new byte[size];
        for (int i = 0, last = size - 1; i < last; i++, value >>>= 7)
            buffer[offset++] = (byte) ((value & 0x7F) | 0x80);

        buffer[offset] = (byte) value;
        return buffer;
    }
Returns the byte array computed from the var int 32 size
protostuff-core/src/main/java/io/protostuff/ProtobufOutput.java