Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2025-11-11 The HDF5 Field Guide

- Main Page
- Getting started
- User Guide
- Reference Manual
- Cookbook
- Technical Notes
- RFCs
- Specifications
- Glossary
- Full-Text Search
- About

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
h5repack.h File Reference
`#include "H5private.h"`
`#include "hdf5.h"`
`#include "h5trav.h"`
`#include "h5tools.h"`
`#include "h5tools_utils.h"`

## Data Structures
struct | chunk_info_t
struct | filter_info_t
struct | named_dt_t
struct | obj_list_t
struct | pack_info_t
struct | pack_opt_t
struct | pack_opttbl_t

## Macros
#define | FORMAT_OBJ " %-27s %s\n" /* obj type, name */
#define | FORMAT_OBJ_ATTR " %-27s %s\n" /* obj type, name */
#define | FORMAT_OBJ_ATTR_NOTIME " %-27s %s\n" /* obj type, name */
#define | FORMAT_OBJ_ATTR_TIME " %-27s %e/%e %s\n" /* obj type, name */
#define | FORMAT_OBJ_NOTIME " %-27s %s\n" /* obj type, name */
#define | FORMAT_OBJ_TIME " %-27s %e/%e %s\n" /* obj type, name */
#define | FS_PAGESIZE_DEF 4096
#define | FS_PERSIST_DEF false
#define | FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
#define | FS_THRESHOLD_DEF 1
#define | H5_REPACK_MAX_NFILTERS 6
#define | H5FOPENERROR "unable to open file"
#define | MAX_COMPACT_DSIZE 64512 /* max data size for compact layout. -1k for header size */
#define | MAX_NC_NAME 256 /* max length of a name */
#define | MAX_VAR_DIMS 32 /* max per variable dimensions */
#define | PFORMAT "%-7s %-7s %-7s\n" /* chunk info, compression info, name*/
#define | PFORMAT1 "%-7s %-7s %-7s" /* chunk info, compression info, name*/

## Functions
int | apply_filters (const char *name, int rank, const hsize_t *dims, size_t msize, hid_t dcpl_id, pack_opt_t *options, int *has_filter)
int | copy_attr (hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options)
hid_t | copy_named_datatype (hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, trav_table_t *travt, pack_opt_t *options)
int | copy_objects (const char *fnamein, const char *fnameout, pack_opt_t *options)
int | do_copy_refobjs (hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *options)
int | h5repack (const char *infile, const char *outfile, pack_opt_t *options)
int | h5repack_addfilter (const char *str, pack_opt_t *options)
int | h5repack_addlayout (const char *str, pack_opt_t *options)
int | h5repack_cmp_pl (const char *fname1, const char *fname2, pack_opt_t *options)
int | h5repack_end (pack_opt_t *options)
int | h5repack_init (pack_opt_t *options, int verbose, bool latest)
int | h5repack_verify (const char *in_fname, const char *out_fname, pack_opt_t *options)
void | init_packobject (pack_info_t *obj)
int | named_datatype_free (named_dt_t **named_dt_head_p, int ignore_err)
int | options_add_filter (obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pack_opttbl_t *table)
int | options_add_layout (obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pack_opttbl_t *table)
pack_info_t * | options_get_object (const char *path, pack_opttbl_t *table)
int | options_table_free (pack_opttbl_t *table)
int | options_table_init (pack_opttbl_t **tbl)
obj_list_t * | parse_filter (const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t *options, int *is_glb)
obj_list_t * | parse_layout (const char *str, unsigned *n_objs, pack_info_t *pack, pack_opt_t *options)

## Macro Definition Documentation

## ◆ FORMAT_OBJ

#define FORMAT_OBJ " %-27s %s\n" /* obj type, name */

## ◆ FORMAT_OBJ_ATTR

#define FORMAT_OBJ_ATTR " %-27s %s\n" /* obj type, name */

## ◆ FORMAT_OBJ_ATTR_NOTIME

#define FORMAT_OBJ_ATTR_NOTIME " %-27s %s\n" /* obj type, name */

## ◆ FORMAT_OBJ_ATTR_TIME

#define FORMAT_OBJ_ATTR_TIME " %-27s %e/%e %s\n" /* obj type, name */

## ◆ FORMAT_OBJ_NOTIME

#define FORMAT_OBJ_NOTIME " %-27s %s\n" /* obj type, name */

## ◆ FORMAT_OBJ_TIME

#define FORMAT_OBJ_TIME " %-27s %e/%e %s\n" /* obj type, name */

## ◆ FS_PAGESIZE_DEF

#define FS_PAGESIZE_DEF 4096

## ◆ FS_PERSIST_DEF

#define FS_PERSIST_DEF false

## ◆ FS_STRATEGY_DEF

#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR

## ◆ FS_THRESHOLD_DEF

#define FS_THRESHOLD_DEF 1

## ◆ H5_REPACK_MAX_NFILTERS

#define H5_REPACK_MAX_NFILTERS 6

## ◆ H5FOPENERROR

#define H5FOPENERROR "unable to open file"

## ◆ MAX_COMPACT_DSIZE

#define MAX_COMPACT_DSIZE 64512 /* max data size for compact layout. -1k for header size */

## ◆ MAX_NC_NAME

#define MAX_NC_NAME 256 /* max length of a name */

## ◆ MAX_VAR_DIMS

#define MAX_VAR_DIMS 32 /* max per variable dimensions */

## ◆ PFORMAT

#define PFORMAT "%-7s %-7s %-7s\n" /* chunk info, compression info, name*/

## ◆ PFORMAT1

#define PFORMAT1 "%-7s %-7s %-7s" /* chunk info, compression info, name*/

## Function Documentation

## ◆ apply_filters()

int apply_filters | ( | const char * | name,
|  | int | rank,
|  | const hsize_t * | dims,
|  | size_t | msize,
|  | hid_t | dcpl_id,
|  | pack_opt_t * | options,
|  | int * | has_filter )

## ◆ copy_attr()

int copy_attr | ( | hid_t | loc_in,
|  | hid_t | loc_out,
|  | named_dt_t ** | named_dt_head_p,
|  | trav_table_t * | travt,
|  | pack_opt_t * | options )

## ◆ copy_named_datatype()

hid_t copy_named_datatype | ( | hid_t | type_in,
|  | hid_t | fidout,
|  | named_dt_t ** | named_dt_head_p,
|  | trav_table_t * | travt,
|  | pack_opt_t * | options )

## ◆ copy_objects()

int copy_objects | ( | const char * | fnamein,
|  | const char * | fnameout,
|  | pack_opt_t * | options )

## ◆ do_copy_refobjs()

int do_copy_refobjs | ( | hid_t | fidin,
|  | hid_t | fidout,
|  | trav_table_t * | travt,
|  | pack_opt_t * | options )

## ◆ h5repack()

int h5repack | ( | const char * | infile,
|  | const char * | outfile,
|  | pack_opt_t * | options )

## ◆ h5repack_addfilter()

int h5repack_addfilter | ( | const char * | str,
|  | pack_opt_t * | options )

## ◆ h5repack_addlayout()

int h5repack_addlayout | ( | const char * | str,
|  | pack_opt_t * | options )

## ◆ h5repack_cmp_pl()

int h5repack_cmp_pl | ( | const char * | fname1,
|  | const char * | fname2,
|  | pack_opt_t * | options )

## ◆ h5repack_end()

int h5repack_end | ( | pack_opt_t * | options | ) |

## ◆ h5repack_init()

int h5repack_init | ( | pack_opt_t * | options,
|  | int | verbose,
|  | bool | latest )

## ◆ h5repack_verify()

int h5repack_verify | ( | const char * | in_fname,
|  | const char * | out_fname,
|  | pack_opt_t * | options )

## ◆ init_packobject()

void init_packobject | ( | pack_info_t * | obj | ) |

## ◆ named_datatype_free()

int named_datatype_free | ( | named_dt_t ** | named_dt_head_p,
|  | int | ignore_err )

## ◆ options_add_filter()

int options_add_filter | ( | obj_list_t * | obj_list,
|  | unsigned | n_objs,
|  | filter_info_t | filt,
|  | pack_opttbl_t * | table )

## ◆ options_add_layout()

int options_add_layout | ( | obj_list_t * | obj_list,
|  | unsigned | n_objs,
|  | pack_info_t * | pack,
|  | pack_opttbl_t * | table )

## ◆ options_get_object()

pack_info_t * options_get_object | ( | const char * | path,
|  | pack_opttbl_t * | table )

## ◆ options_table_free()

int options_table_free | ( | pack_opttbl_t * | table | ) |

## ◆ options_table_init()

int options_table_init | ( | pack_opttbl_t ** | tbl | ) |

## ◆ parse_filter()

obj_list_t * parse_filter | ( | const char * | str,
|  | unsigned * | n_objs,
|  | filter_info_t * | filt,
|  | pack_opt_t * | options,
|  | int * | is_glb )

## ◆ parse_layout()

obj_list_t * parse_layout | ( | const char * | str,
|  | unsigned * | n_objs,
|  | pack_info_t * | pack,
|  | pack_opt_t * | options )