MGARD-CPU is a CPU implementation of the MGARD lossy compressor. It is built by default and used as the base implementation for MGARD-ROI and MGARD-QOI.
To build and install MGARD-CPU, run the following from the root of the repository. You will need CMake and Protobuf.
$ cmake -S . -B build -D CMAKE_INSTALL_PREFIX=<location to install MGARD>
$ cmake --build build
$ cmake --install buildTo build the documentation, run cmake with -D MGARD_ENABLE_DOCS=ON.
You will need Doxygen.
The documentation will be installed to ${CMAKE_INSTALL_PREFIX}/share/doc/MGARD/ by default.
Open index.html with a browser to read.
To build the benchmarks, run cmake with -D MGARD_ENABLE_BENCHMARKS=ON.
You will need Google Benchmark.
You can then run the benchmarks with build/bin/benchmarks.
The API consists of a header file compress.hpp providing declarations for function templates mgard::compress and mgard::decompress.
See the header for documentation of these templates.
To use MGARD in your project, you will need to tell your compiler where to find the MGARD headers (by default, ${CMAKE_INSTALL_PREFIX}/include/mgard/) and library (by default, ${CMAKE_INSTALL_PREFIX}/lib/).
If you're using CMake, you can call find_package(mgard) and add a dependency to the mgard::mgard imported target.
See the examples directory for a basic example.
To build the command line interface, run cmake with -D MGARD_ENABLE_CLI=ON.
You will need TCLAP.
A convenience executable called mgard will be built and installed to ${CMAKE_INSTALL_PREFIX}/bin/ by default.
You can get help with the CLI by running the following commands.
$ mgard --help
$ man mgardThis executable is an experimental part of the API.