Why not use both RAM and hard drive space to store even more data?
I understand that hard drives are slower, but since you are implementing RLE (or something like it) anyways, why not at least attempt it? Dump the RAM data into a file as fast as possible. If the hard drive can't keep up, then the RAM will get full like usual.
I have a SSD so it should help quite a bit if the data toggle is sparse.