add compression option to write.hdf5