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

# hdfcomp(1)

compress 8-bit raster images in an HDF file

## NAME

hdfcomp - compress 8-bit raster images in an HDF file

## SYNOPSIS

**hdfcomp** *output-filename* \[**-c**\|**-r**\|**-i**\] *input-filename-1* \[**-c**\|**-r**\|**-i**\] *input-filename-2*...

## DESCRIPTION

**hdfcomp** reads RIS8 images from a set of HDF files, compresses them and stores the compressed data in a second HDF file.  If the output HDF file exists, the compressed images will be appended to it.

## OPTIONS

- **-r**

  No Compression. Apply no compression to the output data. (the default).

- **-c**

  Run length coding.  Compress the output data using run-length encoding.

- **-i**

  IMCOMP Compression. Compress the output data using the IMCOMP method.

## EXAMPLES

A directory contains twenty files named "storm001", "storm002", ... "storm020". Each of these files contains a single RIS8 image. To compress these images using run-length encoding and store them in a file named "altcomp.hdf", use the following hdfcomp command:

```
        hdfcomp allcomp.hdf -c storm*.hdf
```

## SEE ALSO

[**hdfpack**(1)](/hdfpack/1.md), [**hdf**(5)](/hdf/5.md)
