Time: when "writeFormat" is set to "binary" disallow compression

Compressing and decompressing binary files introduces a significant IO overhead
without a providing significant reduction in file-size.
This commit is contained in:
Henry Weller
2017-02-03 14:51:04 +00:00
parent 7612b51828
commit 7a7fa4350d

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -347,6 +347,20 @@ void Foam::Time::readDict()
(
controlDict_.lookup("writeCompression")
);
if
(
writeFormat_ == IOstream::BINARY
&& writeCompression_ == IOstream::COMPRESSED
)
{
IOWarningInFunction(controlDict_)
<< "Selecting compressed binary is inefficient and ineffective"
", resetting to uncompressed binary"
<< endl;
writeCompression_ = IOstream::UNCOMPRESSED;
}
}
controlDict_.readIfPresent("graphFormat", graphFormat_);