Add compression to select file formats written by hiphive
Description
The read
/write
functions featured by several classes (e.g., ClusterSpace
and StructureContainer
) generate files that can easily become quite large.
This applies in particular for StructureContainer
files, which, e.g., in the case of the MoS2 monolayer defects that we are working on, can easily reach sizes in excess of one or even several GB.
Gzipping these files commonly leads to a substantial size reduction, e.g.,:
MoS2-monolayer-hex-n192-S-divac-6.0-3.0.sc.gz 1.4G --> 28M
MoS2-monolayer-hex-n192-Mo-vac-12.0-3.0.sc.gz 1.1G --> 61M
MoS2-monolayer-hex-n192-S-int-6.0-3.0.sc.gz 497M --> 25M
MoS2-monolayer-hex-n108-K-ad1-6.0-3.0.sc.gz 88M --> 6.5M
MoS2-monolayer-hex-n192-ideal-8.5-3.0.sc.gz 11M --> 6.9M
It is therefore worthwhile to consider whether the tarballs that underlie these storage objects should be gzipped by default or whether one should add at least the possibility to read files gzipped by the user.
Edited by Paul Erhart