hi all, I need some help w.r.t. arrays and it's representation. My assignment was to think of an idea(s) to redesign a 2-dimensional array that is a compressed form of binary patterns.

e.g. {3,9,4,2} is compressed form and it's decompressed form is 111000000000111100. Then same for next few rows.

I did some reading up and found out that it is called run-length encoding. The question requires me to redesign the array such that through a decompression method, it will give the same binary pattern.

I was thinking that every number is significant in it's representation and hence, the number of entries should remain the same.

Does anyone have any idea how a smaller array can be implemented to show the same data after decompression?