summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 03eefcf..cfd542a 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -976,6 +976,16 @@ int do_copy_objects(hid_t fidin,
/* get the storage size of the input dataset */
dsize_in=H5Dget_storage_size(dset_in);
+ /* 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 ( size_dset < options->min_comp )
+ apply_s=0;
+ }
+
/* apply the filter */
if (apply_s)
{