Question about memory allocations

The data in this program could be made a lot smaller by using bit masks instead of strings. For one thing, the spaces are not necessary, because they appear every 8 characters. It would be possible to eliminate all of the spaces simply by keeping count of how many of the other characters have been loaded into the shift registers.

The only remaining characters are 'o', 'g', and 'r'. Since there are only 3 possible characters, you need only 2 bits to encode each, not an entire 8-bit character. Each group of 8 symbols could thus be represented in a 16-bit unsigned int.

This is the kind of situation where I have found it helpful to write a program that runs on my PC that reads in the human readable o/g/r symbols, converts them to the correct bit patterns, and generates the compressed data structure as a header file that can be included and used by the rendering program. Then you just download the compressed program + data into your Arduino.

You will need to learn about bitwise operations in C++ such as shift-left (<<) shift-right (>>), bitwise AND (&), bitwise OR (|), etc, in order to package and unpackage groups of bits from an integer.