Skip to content

Instantly share code, notes, and snippets.

@lindstro
lindstro / decode_cdvals.c
Created July 18, 2025 17:58
Convert H5Z-ZFP cd_values to zfp mode and parameters
#include <stdio.h>
#include <stdlib.h>
typedef unsigned int uint;
#include "H5Zzfp_plugin.h"
/* convert cd_vals to zfp mode and parameters */
static int
decode_cdvals(const unsigned int cd_vals[], int n, double* rate, double* acc, uint* prec, uint* minbits, uint* maxbits, uint* maxprec, int* minexp)