Skip to content

Commit

Permalink
ckp
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Oct 2, 2024
1 parent 7122fbb commit 884a330
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions libnczarr/zformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ NCZF_hdf2codec(const NC_FILE_INFO_T* file, const NC_VAR_INFO_T* var, NCZ_Filter*
return THROW(stat);
}

int
NCZF_codec2hdf(const NC_FILE_INFO_T* file, NCZ_Filter* filter)
{
int stat = NC_NOERR;
NCZ_FILE_INFO_T* zfile = NULL;

zfile = (NCZ_FILE_INFO_T*)file->format_file_info;
assert(zfile != NULL);
stat = zfile->dispatcher->codec2hdf(file,filter);
return THROW(stat);
}

int
NCZF_dtype2nctype(const NC_FILE_INFO_T* file, const char* dtype, nc_type typehint, nc_type* nctypep, int* endianp, size_t* typelenp)
{
Expand Down
6 changes: 5 additions & 1 deletion libnczarr/zformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ typedef struct NCZ_Formatter {
int (*dtype2nctype)(const NC_FILE_INFO_T* file, const char* dtype, nc_type typehint, nc_type* nctypep, int* endianp, size_t* typelenp);
int (*nctype2dtype)(const NC_FILE_INFO_T* file, nc_type nctype, int endianness, size_t typesize, char** dtypep, char** daliasp);

/* Misc. Actions */
/* Filter Operations */
int (*hdf2codec) (const NC_FILE_INFO_T* file, const NC_VAR_INFO_T* var, NCZ_Filter* filter); /* Code converter */
int (*codec2hdf) (const NC_FILE_INFO_T* file, NCZ_Filter* filter); /* Code converter */

/* Misc. Actions */
int (*build_chunkkey)(size_t rank, const size64_t* chunkindices, char dimsep, char** keyp);

/* Search functions */
Expand Down Expand Up @@ -150,6 +153,7 @@ extern int NCZF_download_var_json(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, stru
extern int NCZF_dtype2nctype(const NC_FILE_INFO_T* file, const char* dtype, nc_type typehint, nc_type* nctypep, int* endianp, size_t* typelenp);
extern int NCZF_nctype2dtype(const NC_FILE_INFO_T* file, nc_type nctype, int endianness, size_t typelen, char** dtypep, char** daliasp);
extern int NCZF_hdf2codec(const NC_FILE_INFO_T* file, const NC_VAR_INFO_T* var, NCZ_Filter* filter);
extern int NCZF_codec2hdf(const NC_FILE_INFO_T* file, NCZ_Filter* filter);
extern int NCZF_buildchunkkey(const NC_FILE_INFO_T* file, size_t rank, const size64_t* chunkindices, char dimsep, char** keyp);

/* Search functions */
Expand Down

0 comments on commit 884a330

Please sign in to comment.