CSV encoding and decoding for hmatrix.