Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions for c|dparams, storage and io defaults #607

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions blosc/blosc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
20 changes: 20 additions & 0 deletions include/blosc2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/**
Expand Down