MGARD 
MGARD (MultiGrid Adaptive Reduction of Data) is a technique for multilevel lossy compression of scientific data based on the theory of multigrid methods. This is an experimental C++ implementation for integration with existing software; use at your own risk! We encourage you to make a GitHub issue if you run into any problems using the software, have any questions or suggestions, etc.
The API consists of a header file include/mgard_api.h providing prototypes for overloaded functions mgard_compress and mgard_decompress.
See the header for documentation of these functions.
To use MGARD,
- Run
make lib/libmgard.ato generate a static library. - Include
mgard_api.hin any source files making use of the API. - Link against
libmgard.awhen creating your executable.
References
The theory behind MGARD is developed in the following papers, which also address implementation issues and present numerical examples. Reference [2] covers the simplest case and is a natural starting point.
- Ben Whitney. Multilevel Techniques for Compression and Reduction of Scientific Data. PhD thesis, Brown University, 2018.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Univariate Case. Computing and Visualization in Science 19, 65–76, 2018.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Multivariate Case. SIAM Journal on Scientific Computing 41 (2), A1278–A1303, 2019.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—Quantitative Control of Accuracy in Derived Quantities. SIAM Journal on Scientific Computing 41 (4), A2146–A2171, 2019.
- Mark Ainsworth, Ozan Tugluk, Ben Whitney, and Scott Klasky. Multilevel Techniques for Compression and Reduction of Scientific Data—The Unstructured Case. SIAM Journal on Scientific Computing, to appear.
Caveats
If you use a certain value of s to compress your data, you must use the same value of s to decompress it.
You cannot agnostically decompress the compressed representation, and the value of s is not currently stored in the compressed stream, so if you forget the value of s that you used when compressing your data, your data is gone.
In addition, there is currently no way to detect if an inconsistent value of s has been passed, so the code returns corrupted data silently.