Yep.
Replace $LEVEL with something 1-9
h5repack -f SHUF -f GZIP=$LEVEL input.h5 output.h5
Dave McCloskey
yes, that is actually given as an example in the usage
type
./h5repack -h
here is the usage
usage: h5repack [OPTIONS] file1 file2
file1 Input HDF5 File
file2 Output HDF5 File
OPTIONS
-h, --help Print a usage message and exit
-v, --verbose Verbose mode, print object information
-V, --version Print version number and exit
-n, --native Use a native HDF5 type when repacking
-L, --latest Use latest version of file format
-c L1, --compact=L1 Maximum number of links in header messages
-i L2, --indexed=L2 Minimum number of links in the indexed format
-s S[:F], --ssize=S[:F] Shared object header message minimum size
-m T, --threshold=T Do not apply the filter to datasets smaller than T
-e M, --file=M Name of file M with the -f and -l options
-f FILT, --filter=FILT Filter type
-l LAYT, --layout=LAYT Layout type
T - is an integer greater than 1, size of dataset in bytes
M - is a filename.
F - is the shared object header message type, any of <dspace|dtype|fill|
pline>>. If F is not specified, S applies to all messages
FILT - is a string with the format:
<list of objects>:<name of filter>=<filter parameters>
<list of objects> is a comma separated list of object names, meaning apply
compression only to those objects. If no names are specified, the filter
is applied to all objects
<name of filter> can be:
GZIP, to apply the HDF5 GZIP filter (GZIP compression)
SZIP, to apply the HDF5 SZIP filter (SZIP compression)
SHUF, to apply the HDF5 shuffle filter
FLET, to apply the HDF5 checksum filter
NBIT, to apply the HDF5 NBIT filter (NBIT compression)
SOFF, to apply the HDF5 Scale/Offset filter
NONE, to remove all filters
<filter parameters> is optional filter parameter information
GZIP=<deflation level> from 1-9
SZIP=<pixels per block,coding> pixels per block is a even number in
2-32 and coding method is either EC or NN
SHUF (no parameter)
FLET (no parameter)
NBIT (no parameter)
SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type
is either IN or DS
NONE (no parameter)
LAYT - is a string with the format:
<list of objects>:<layout type>=<layout parameters>
<list of objects> is a comma separated list of object names, meaning that
layout information is supplied for those objects. If no names are
specified, the layout type is applied to all objects
<layout type> can be:
CHUNK, to apply chunking layout
COMPA, to apply compact layout
CONTI, to apply continuous layout
<layout parameters> is optional layout information
CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension
COMPA (no parameter)
CONTI (no parameter)
Examples of use:
1) h5repack -v -f GZIP=1 file1 file2
GZIP compression with level 1 to all objects
2) h5repack -v -f A:SZIP=8,NN file1 file2
SZIP compression with 8 pixels per block and NN coding method to object A
3) h5repack -v -l A,B:CHUNK=20x10 -f C,D,F:NONE file1 file2
Chunked layout, with a layout size of 20x10, to objects A and B
and remove filters to objects C, D, F
4) h5repack -L -c 10 -s 20:dtype file1 file2
Using latest file format with maximum compact group size of 10 and
and minimum shared datatype size of 20
5) h5repack -f SHUF -f GZIP=1 file1 file2
Add both filters SHUF and GZIP in this order to all datasets
···
At 01:21 PM 4/11/2008, McCloskey, David L. wrote:
From: Streithorst, Kip [mailto:KSTREITH@ball.com]
Sent: Friday, April 11, 2008 1:16 PM
To: hdf-forum@hdfgroup.org
Subject: Question on using h5repack
I�m having some difficulty using h5repack. Can you use h5repack to apply multiple filters in on execution, ie. both GZIP and SHUFFLE? If so, how do you contort the command-line arguments to make that happen?
Thanks,
Kip
This message and any enclosures are intended only for the addressee. Please
notify the sender by email if you are not the intended recipient. If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful. Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.
--------------------------------------------------------------
Pedro Vicente (T) 217.265-0311
pvn@hdfgroup.org
The HDF Group. 1901 S. First. Champaign, IL 61820