#include <vector>
#ifdef DEAL_II_WITH_ZLIB
-# include <boost/iostreams/filter/zlib.hpp>
-
# include <zlib.h>
#endif
# include <hdf5.h>
#endif
+DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/device/back_inserter.hpp>
#include <boost/iostreams/filtering_stream.hpp>
+#ifdef DEAL_II_WITH_ZLIB
+# include <boost/iostreams/filter/zlib.hpp>
+#endif
+DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
-DEAL_II_NAMESPACE_OPEN
+DEAL_II_NAMESPACE_OPEN
+
// we need the following exception from a global function, so can't declare it
// in the usual way inside a class
namespace
if (format_name == "deal.II intermediate")
return deal_II_intermediate;
- if (format_name == "parallel deal.II intermediate")
- return parallel_deal_II_intermediate;
-
if (format_name == "hdf5")
return hdf5;
boost::iostreams::filtering_ostream f;
if (compression != VtkFlags::no_compression)
+# ifdef DEAL_II_WITH_ZLIB
f.push(boost::iostreams::zlib_compressor());
+# else
+ AssertThrow(
+ false,
+ ExcMessage(
+ "Compression requires deal.II to be configured with ZLIB support."));
+# endif
boost::iostreams::back_insert_device<std::vector<char>> inserter(
my_buffer);
in.read(temp_buffer.data(), chunk_sizes[n]);
boost::iostreams::filtering_istreambuf f;
- if (header.compression)
+ if (static_cast<DataOutBase::VtkFlags::ZlibCompressionLevel>(
+ header.compression) != DataOutBase::VtkFlags::no_compression)
+#ifdef DEAL_II_WITH_ZLIB
f.push(boost::iostreams::zlib_decompressor());
+#else
+ AssertThrow(
+ false,
+ ExcMessage(
+ "Decompression requires deal.II to be configured with ZLIB support."));
+#endif
boost::iostreams::basic_array_source<char> source(temp_buffer.data(),
temp_buffer.size());