Skip to content

Commit

Permalink
Change default compression level to 6.
Browse files Browse the repository at this point in the history
This is much faster with insignificant differences in sizes.
  • Loading branch information
prabhuramachandran committed May 9, 2020
1 parent 9992a46 commit 89288e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysph/solver/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from pysph import has_h5py

output_formats = ('hdf5', 'npz')
COMPRESSION_LEVEL = 6


def _to_str(s):
Expand Down Expand Up @@ -233,7 +234,8 @@ def _get_constants(self, grp):

def _get_compress_options(self):
if self.compress:
return dict(compression="gzip", compression_opts=9)
return dict(compression="gzip",
compression_opts=COMPRESSION_LEVEL)
else:
return {}

Expand Down

0 comments on commit 89288e9

Please sign in to comment.