diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2010-09-15 19:00:44 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2010-09-15 19:00:44 (GMT) |
commit | f4af8527642179df0d8b380ae27fecd73c463dfa (patch) | |
tree | 4cf90e44fa1f0fb2241204457f4a1e65d73a26ed /tools/h5repack/h5repack_copy.c | |
parent | 6ef5b395eab45a61ff944d7d9214dca32730b826 (diff) | |
download | hdf5-f4af8527642179df0d8b380ae27fecd73c463dfa.zip hdf5-f4af8527642179df0d8b380ae27fecd73c463dfa.tar.gz hdf5-f4af8527642179df0d8b380ae27fecd73c463dfa.tar.bz2 |
[svn-r19391] Purpose:
Fix for Bug1896 h5repack - changing layout to COMPACT does not work
Description:
Merged from hdf5 trunk (r19389)
Make h5repack be able to convert a layout to COMPACT for small size dataset as default. Also add verifying layout changes in our test script.
Tested:
jam, amani
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 6853297..df49b3c 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -745,9 +745,15 @@ int do_copy_objects(hid_t fidin, /* get the storage size of the input dataset */ dsize_in=H5Dget_storage_size(dset_in); - /* check for datasets too small */ - if (nelmts*msize < options->min_comp ) - apply_s=0; + /* check for small size datasets (less than 1k) except + * changing to COMPACT. For the reference, COMPACT is limited + * by size 64K by library. + */ + if (options->layout_g != H5D_COMPACT) + { + if ( nelmts*msize < options->min_comp ) + apply_s=0; + } /* apply the filter */ if (apply_s) |