---
name: "hrepack"
section: "1"
platform: "linux"
package: "hdf4-tools"
version: "4.3.0-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hrepack"
---

# hrepack(1)

copies an HDF file to a new file

## 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*\]

## DESCRIPTION

**hrepack** copies an HDF file to a new file with/without compression and/or chunking.

## OPTIONS

- FC**-i**F\[0\] *input*

  input HDF File

- FC**-o**F\[0\] *output*

  output HDF File

- FC**-V**F\[0\]

  prints version of the HDF4 library and exits

- FC**-h**F\[0\]

  prints usage information

- FC**-v**F\[0\]

  verbose mode

- FC**-t**F\[0\] *comp\_info*

  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.

  \<type of compression\> can be:

  RLE

  for RLE compression

  HUFF

  for Huffman

  GZIP

  for gzip

  JPEG

  for JPEG (for images only)

  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)

- FC**-c**F\[0\] *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

- FC**-f**F\[0\] *cfile*

  file with compression information FC**-t**F\[0\] and FC**-c**F\[0\]

- FC**-m**F\[0\] *size*

  do not compress objects smaller than size (bytes)

## EXAMPLES

compresses all objects in the file FC*file1.hdf*F\[0\], using RLE compression

```
FC
hrepack -v -i file1.hdf -o file2.hdf -t '*:RLE'
      F[0]
```

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

```
FC
hrepack -v -i file1.hdf -o file2.hdf -t '/group1/A,/group2/B,C:HUFF 1'
      F[0]
```

applies RLE compression for object /group1/D.

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

```
FC
hrepack -v -i file1.hdf -o file2.hdf -t '/group1/D:RLE' -c 'D,E:10x10'
      F[0]
```

uncompresses object A

```
FC
hrepack -v -i file1.hdf -o file2.hdf -t 'A:NONE'
      F[0]
```

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

```
FC
hrepack -v -i file1.hdf -o file2.hdf -t 'A:SZIP 8,NN'
      F[0]
```

Note: the use of the verbose option -v is recommended
