diff options
Diffstat (limited to 'tools/h5repack/h5repack_filters.c')
-rw-r--r-- | tools/h5repack/h5repack_filters.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 6c7bc65..56e08ef 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -345,8 +345,13 @@ int apply_filters(const char* name, /* object name from traverse list */ { switch (obj.filter[i].filtn) { - default: - break; + + /*------------------------------------------------------------------------- + * H5Z_FILTER_NONE 0 , uncompress if compressed + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_NONE: + break; /*------------------------------------------------------------------------- * H5Z_FILTER_DEFLATE 1 , deflation like gzip @@ -436,6 +441,14 @@ int apply_filters(const char* name, /* object name from traverse list */ return -1; } break; + default: + { + if (H5Pset_filter (dcpl_id, obj.filter[i].filtn, H5Z_FLAG_MANDATORY, obj.filter[i].cd_nelmts, obj.filter[i].cd_values)<0) + return -1; + if(H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths)<0) + return -1; + } + break; } /* switch */ }/*i*/ |