summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-09-15 18:32:07 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-09-15 18:32:07 (GMT)
commita6b6b75a79248a57867a243b52ef9a6bca196aff (patch)
tree4b10b115ff74f75b3b72bb7d3261c3632a06ecf6 /tools/h5repack/h5repack_copy.c
parentcb9a804f82bfe32451b4033d8a421efc60e5521e (diff)
downloadhdf5-a6b6b75a79248a57867a243b52ef9a6bca196aff.zip
hdf5-a6b6b75a79248a57867a243b52ef9a6bca196aff.tar.gz
hdf5-a6b6b75a79248a57867a243b52ef9a6bca196aff.tar.bz2
[svn-r19389] Purpose:
Fix for Bug1896 h5repack - changing layout to COMPACT does not work Description: 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, heiwa
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index b736c22..f58a303 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -789,9 +789,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)