Applied-Scientific-Research / Omega2D

Two-dimensional flow solver with GUI using vortex particle and boundary element methods
GNU General Public License v3.0
28 stars 5 forks source link

Use ZLib to compress PNG and VTU file output #35

Open markstock opened 4 years ago

markstock commented 4 years ago

XML-based VTK files can use one of three compression algorithms for data arrays (LZ4, ZLib, LZMA), and PNG writing can use only ZLib. We should support zlib compression for png and vtu file output. Hopefully Paraview can read compressed files - I recall it failing to read any file with "appended" data.

Since zlib is relatively small, we should consider copying a header-only, compliant-licensed library into our repository. Consider zstr, miniz, or gzip-hpp.

Also, since Vtk output needs not only an encoding library but a compression library, maybe we should make it it's own cpp file (to generate a .o file), and not as a pure header - this will save compilation time.

BHill96 commented 4 years ago

The png compression was added by pull request #39. The VTU compression is tricky and will be put on the back-burner for now. The current attempts are stored on the compression branch.