Skip to content

Commit

Permalink
Add io defaults and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed May 13, 2024
1 parent 2949aae commit 3e2724d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
12 changes: 9 additions & 3 deletions blosc/blosc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4695,10 +4695,16 @@ int blosc2_get_slice_nchunks(blosc2_schunk* schunk, int64_t *start, int64_t *sto

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: 18 additions & 2 deletions include/blosc2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1662,14 +1662,30 @@ typedef struct {
//!< Input/output backend.
} blosc2_storage;

/**
* @brief Default struct for #blosc2_storage meant for user initialization.
*/
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 Default struct for #blosc2_storage meant for user initialization.
* @brief Get default struct for #blosc2_io meant for user initialization.
*/
static const blosc2_storage BLOSC2_STORAGE_DEFAULTS = {false, NULL, NULL, NULL, NULL};
BLOSC_EXPORT blosc2_io blosc2_get_blosc2_io_defaults(void);

typedef struct blosc2_frame_s blosc2_frame; /* opaque type */

Expand Down

0 comments on commit 3e2724d

Please sign in to comment.