hrepack(1)

πŸ’– hrepack(1) πŸ’–

okay so bestie, welcome to hrepack β€” the manual page for the hrepack command. it's a whole vibe, it's giving file-transformation main character energy, and by the end of this you're gonna be so obsessed. πŸ¦‹


✨ NAME ✨

hrepack β€” copies an HDF file to a new file 🫢


🌸 SYNOPSIS 🌸

hrepack -i input -o output [-V] [-h] [-v] [-t comp_info] [-c chunk_info]
        [-f cfile] [-m size]

like yes, that's a lot of brackets, but we'll walk through every single one together, no cap. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so hrepack copies an HDF file to a new file β€” with compression and/or chunking, or without them. that's literally the whole point. you feed it an input, you get an output, and you get to decide how the data inside gets squished and chopped up along the way. iconic. ✨


πŸ’… OPTIONS πŸ’…

  • -i input β€” the input HDF file. this is the one you're reading from, bestie. πŸ“₯
  • -o output β€” the output HDF file. this is the new baby you're creating. πŸ“€
  • -V β€” prints the version of the HDF4 library and then exits. it's a one-and-done situation. πŸ‘‹
  • -h β€” prints usage information. your little help menu moment. πŸ™ˆ
  • -v β€” verbose mode. turn it on if you want the command to actually talk to you. πŸ—£οΈ
  • -t comp_info β€” the compression type. comp_info is a string with the format <object list>:<type of compression><parameters> ✨

<object list> is a comma separated list of object names, meaning apply compression only to those objects. '*' means all objects. every last one. periodt.

<type of compression> can be:

  • RLE β€” for RLE compression
  • HUFF β€” for Huffman
  • GZIP β€” for gzip
  • JPEG β€” for JPEG (for images only, so don't try it on random non-image objects)
  • SZIP β€” for szip
  • NONE β€” to uncompress πŸͺ„

<parameters> is optional compression info:

  • RLE β€” no parameter
  • HUFF β€” the skip-size
  • GZIP β€” the deflation level
  • JPEG β€” the quality factor
  • SZIP β€” pixels per block, compression mode (NN or EC)
  • -c chunk_info β€” apply chunking. chunk_info is a string with the format <object list>:<chunk information> 🧩

<object list> is a comma separated list of object names, meaning apply chunking only to those objects. '*' means all objects.

<chunk information> is the chunk size of each dimension: dim_1 x dim_2 x ... dim_n β€” or NONE, to unchunk a previous chunked object. bye bye chunks. πŸ‘‹

  • -f cfile β€” a file with compression information, for -t and -c. πŸ“„
  • -m size β€” do not compress objects smaller than size (in bytes). tiny objects get to stay unbothered, we respect that. πŸ“

🌈 EXAMPLES 🌈

compresses all objects in the file file1.hdf, using RLE compression

hrepack -v -i file1.hdf -o file2.hdf -t '*:RLE'

applies Skipping Huffman compression with skip factor of 1, for objects /group1/A, /group2/B and C

hrepack -v -i file1.hdf -o file2.hdf -t '/group1/A,/group2/B,C:HUFF 1'

applies RLE compression for object /group1/D.

applies chunking to objects D and E using a chunk size of 10 for the 2 dimensions

hrepack -v -i file1.hdf -o file2.hdf -t '/group1/D:RLE' -c 'D,E:10x10'

uncompresses object A

hrepack -v -i file1.hdf -o file2.hdf -t 'A:NONE'

applies SZIP compression to object A, with parameters 8 and NN

hrepack -v -i file1.hdf -o file2.hdf -t 'A:SZIP 8,NN'
πŸ’– Note: the use of the verbose option -v is recommended πŸ’–

and that's the whole page, bestie!! you ate that. πŸŽ€βœ¨ this page is dated 28 May 2016, and it's the hrepack(1) manual β€” shoutout to the source, love that for them. now go compress something responsibly. πŸ‘‘πŸ’œ