are you talking about saving your matrix? If you want an efficient way to save it I would go with RLE encoding. This works wonders at times and for flat land all set to 0, it would take up much less bytes.
00000000000145
00000000002343
...
Imagine the first line just for now and that all numbers are bytes. We have a lot of zeros. this would probably be 2 bytes per zero. Best way around this is to use a byte that flags a "run" (say 255 though that isn't a good idea in real life as there might be a lot of 255's). Then a byte to say how many which in this case is 11 0's, and then the byte representing the character - 0.
RLE would make it look like this (everything in parenths is a byte)-
(255)(11)(0)(1)(4)(5). Instead of 14 bytes, the first row only takes 6 bytes now (less than half!). my matrix editor doesn't support this yet and I'm not totally sure if it really ever will, but I feel it is a good idea (I'm just not bright enough rightnow to use it myself I guess

)!
Current Projects: Game Spawn 85%, mini BSP maker 50%, Height Mapper with many features 75%, Space Tactical (Like BC300AD) 15%.