The second solution is smaller, but more complicated. The lower left corner of the pattern is used to "remember" the position of the next symbol to be copied:
Meaning of the symbols
written in the lower left corner
The target position of the next symbol also has to be saved within the world. The different arrow symbols are used to mark the field the current symbol has to be written at and also to point to the next position.