Space efficient data structure to store bit sparse data

Hello -

What should i use to store a sparse bit data like the below?

The number of rows and columns would be around million.

[1,0,0 ],
[1 ]]

you could use this
wrap the type and implement the two-dimensional indexing on top of it (col*1000000+row or row*1000000+col)