I agree, you should be best off by using an existing proven image format. If you must do it yourself you will probably still end up with something that is very close to some existing tech.
I would think that I would like to store how many times the following byte is repeated
|10|1|1|0|3|1|5|0
Would produce
1111111111011100000
But if one looks at this and optimize it on a byte level you would soon se that this is almost exactly what RLE -compresion does. So long answer made short, take a look at RLE ;)
Good luck!