In my library I copy the data for filling a compressed_matrix directly into the arrays value_data_, index1_data_ and index2_data. The copied data are formatted according to CSC and the compressed_matrix is column_major. The only problem is that the matrix does not get the informations about the change of the number of non-zero values, i.e. the private variables filled1_ and filled2_ are not updated.