Hello, guys is there a way to compress a array with size 20x20 into 10x10 without losing data , I am talking about byte[,].

Мy other question is how can I determine in byte[,] how many line's I have , for example :
1111111111111
1000000000000
1000000000000
1000000000000
1000000000000
1000000000000
1000000000000
The result here should be two line's.