diff --git a/blosc/blosc2.c b/blosc/blosc2.c index 6b337023..13adce50 100644 --- a/blosc/blosc2.c +++ b/blosc/blosc2.c @@ -4692,3 +4692,19 @@ int blosc2_get_slice_nchunks(blosc2_schunk* schunk, int64_t *start, int64_t *sto return rc; } + +blosc2_cparams blosc2_get_blosc2_cparams_defaults(void) { + return BLOSC2_CPARAMS_DEFAULTS; +}; + +blosc2_dparams blosc2_get_blosc2_dparams_defaults(void) { + return BLOSC2_DPARAMS_DEFAULTS; +}; + +blosc2_storage blosc2_get_blosc2_storage_defaults(void) { + return BLOSC2_STORAGE_DEFAULTS; +}; + +blosc2_io blosc2_get_blosc2_io_defaults(void) { + return BLOSC2_IO_DEFAULTS; +}; diff --git a/include/blosc2.h b/include/blosc2.h index 22632bcd..f4521cd0 100644 --- a/include/blosc2.h +++ b/include/blosc2.h @@ -1667,6 +1667,26 @@ typedef struct { */ static const blosc2_storage BLOSC2_STORAGE_DEFAULTS = {false, NULL, NULL, NULL, NULL}; +/** + * @brief Get default struct for compression params meant for user initialization. + */ +BLOSC_EXPORT blosc2_cparams blosc2_get_blosc2_cparams_defaults(void); + +/** + * @brief Get default struct for decompression params meant for user initialization. + */ +BLOSC_EXPORT blosc2_dparams blosc2_get_blosc2_dparams_defaults(void); + +/** + * @brief Get default struct for #blosc2_storage meant for user initialization. + */ +BLOSC_EXPORT blosc2_storage blosc2_get_blosc2_storage_defaults(void); + +/** + * @brief Get default struct for #blosc2_io meant for user initialization. + */ +BLOSC_EXPORT blosc2_io blosc2_get_blosc2_io_defaults(void); + typedef struct blosc2_frame_s blosc2_frame; /* opaque type */ /**