How to enable compression of the HDF5 file associated with XDMFFile?

When I use XDMFFile.write_checkpoint() method, size of the resulting HDF5 file is 384M large (while vector data are 73M when stored as gzipped XML and 9.4M when stored as compressed numpy array).
As I need to store a lot of solutions, I need the file compression - but have absolutely no idea how to enable it.

1 Like

This does not directly answer your question. But if you are solving a problem in which the mesh is static over time, the following helps to reduce the file size considerably:

import dolfin
file = dolfin.XDMFFile('Test.xdmf')
file.parameters['rewrite_function_mesh'] = False