This is the ZFP C compression library for the Zig programming language. Currently does not wrap the C++ compressed array classes.
If you are starting a new package:
mkdir my_project;cd my_project
zig init
## add the package to 'build.zig.zon'
zig fetch --save=zfp git+https://github.com/allyourcodebase/zfp.gitThis will add the zig C library as a dependency to your project. Next, if you are linking it to a library or executable, add the following to build.zig:
pubfnbuild(b: *std.Build) !void {
consttarget=b.standardTargetOptions(.{});
constoptimize=b.standardOptimizeOption(.{});
constzfp_dep=b.dependency("zfp", .{
.target=target,
.optimize=optimize,
});
// if you are linking it to a library...constlib_mod=b.createModule(.{
.root_source_file=b.path("src/root.zig"),
.target=target,
.optimize=optimize,
});
lib_mod.linkLibrary(zfp_dep.artifact("zfp"));
// or, if you are linking it to an executable...constexe_mod=b.createModule(.{
.root_source_file=b.path("src/main.zig"),
.target=target,
.optimize=optimize,
});
exe_mod.linkLibrary(zfp_dep.artifact("zfp"));
}The target version of Zig is 0.15.2. It may work with earlier versions, but has not been tested.