Source
printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n", options->ublock_filename);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
* File: h5repack.c
* Purpose: Public API functions
*-------------------------------------------------------------------------
*/
static int check_options(pack_opt_t *options);
static int check_objects(const char* fname, pack_opt_t *options);
static const char* get_sfilter(H5Z_filter_t filtn);
static int have_request(pack_opt_t *options);
/*-------------------------------------------------------------------------
* Function: h5repack
*
* Purpose: locate all high-level HDF5 objects in the file
* and compress/chunk them using options
*
* Algorithm: 2 traversals are made to the file; the 1st builds a list of
* the objects, the 2nd makes a copy of them, using the options;
* the reason for the 1st traversal is to check for invalid
* object name requests
*
* Return: 0, ok, -1, fail
*-------------------------------------------------------------------------
*/
int h5repack(const char* infile, const char* outfile, pack_opt_t *options) {
/* check input */
if (check_options(options) < 0)
return -1;
/* check for objects in input that are in the file */
if (check_objects(infile, options) < 0)
return -1;