h5repack(1)

πŸ’– h5repack πŸ’–

okay bestie, welcome to h5repack(1), a page from the General Commands Manual, and honestly? she's iconic. let's get into it 🫢


✨ NAME ✨

h5repack β€” copy an HDF5 file to a new file, with or without compression/chunking πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

h5repack -i file1 -o file2 [-h] [-v] [-f Β΄filterΒ΄] [-l Β΄layoutΒ΄] [-m number] [-e file]

🌈 DESCRIPTION 🌈

h5repack is a command line tool that takes HDF5 filters and applies them to an input file file1, then saves the whole glow-up into a brand-new file, file2. new file, new you, periodt ✨

filter is a string, and the format is literally:

<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 you don't name any objects, the filter gets applied to all of them. no cap.

<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
  • NONE, to remove the filter

<filter parameters> is where the optional compression info lives:

  • SHUF (no parameter)
  • FLET (no parameter)
  • 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 'EC' or 'NN')

layout is a string too, and her format is:

<list of objects> : <layout type>

<list of objects> is a comma separated list of object names, meaning that layout information is supplied for those objects. if you name zero objects, the layout gets applied to all of them. same energy fr fr.

<layout type> can be:

  • CHUNK, to apply chunking layout
  • COMPA, to apply compact layout
  • CONTI, to apply continuous layout

<layout parameters> shows up for the chunk case only, and it's the chunk size of each dimension: <dim_1 x dim_2 x ... dim_n> πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • file1,file2 β€” the input and output HDF5 files, your before and your after πŸ¦‹
  • -h β€” print a help message
  • -f filter β€” filter type
  • -l layout β€” layout type
  • -v β€” verbose mode. prints output (list of objects in the file, filters and layout applied). she's chatty and we love that πŸ’¬
  • -e file β€” file with the -f and -l options (only filter and layout flags)
  • -d delta β€” print only differences that are greater than the limit delta. delta must be a positive number. the comparison criterion is whether the absolute value of the difference of two corresponding values is greater than delta (e.g., |a-b| > delta, where a is a value in file1 and b is a value in file2).
  • -m number β€” do not apply the filter to objects which size in bytes is smaller than number. if no size is specified a minimum of 1024 bytes is assumed.
bestie reminder: that -d delta has to be a positive number, okay? don't try to be cute with it πŸ™ˆ

πŸŽ€ EXAMPLES πŸŽ€

apply GZIP compression to all objects in file1 and save the output in file2:

h5repack -i file1 -o file2 -f GZIP=1 -v

apply SZIP compression only to object dset1:

h5repack -i file1 -o file2 -f dset1:SZIP=8,NN -v

apply a chunked layout to objects dset1 and dset2:

h5repack -i file1 -o file2 -l dset1,dset2:CHUNK=20x10 -v

πŸ‘‘ SEE ALSO πŸ‘‘

h5dump(1), h5ls(1), h5diff(1), h5import(1), gif2h5(1), h52gif(1), h5perf(1), h5repart(1).

go read those too, they're the rest of the friend group πŸ’œ


and that's the whole page, bestie!! this was h5repack(1) from the General Commands Manual β€” no extra version or date tea on this one, she's just out here being h5repack(1), timeless, main character energy 🌟