Routines (alphabetical) > Routines: H > HDF-EOS Routines > EOS_SW_COMPINFO

# EOS_SW_COMPINFO

This function returns the compression code and compression parameters for a given field.

## Examples

To retrieve the compression information about the Opacity field defined in the EOS_SW_DEFCOMP section:

status = EOS_SW_COMPINFO(swathID, "Opacity", compcode, compparm)

## Syntax

Result = EOS_SW_COMPINFO(swathID, fieldname, compcode, compparm)

## Return Value

Returns SUCCEED(0) if successful and FAIL(–1) otherwise.

## Arguments

### swathID

Swath id (long) returned by EOS_SW_CREATE or EOS_SW_ATTACH.

### fieldname

Fieldname (string).

### compcode

A named variable that will contain the HDF compression code (long).

### compparm

A named variable that will contain the compression parameters (long).

## Keywords

None

## Version History

5.2 | Introduced