[Back to Interface] [Prev] [Next]

GRsetcompress/mgscompress

(Note: The GRsetcompress routine does not work in the current release.)

intn GRsetcompress(int32 ri_id, int32 comp_type, comp_info *c_info)

ri_id IN:

Raster image identifier returned by GRcreate or GRselect

comp_type IN:

Compression method for the image data

C only:

c_info IN:

Pointer to the comp_info union

Fortran only:

comp_prm IN:

Compression parameters array

Purpose

Specifies if the raster image will be stored in a file as a compressed raster image.

Return value

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

Description

GRsetcompress specifies if the raster image specified by the parameter ri_id will be stored in the file in compressed format.

The compression method is specified by the parameter comp_type. Valid values of the parameter comp_type are:

COMP_CODE_NONE (or 0) for no compression

COMP_CODE_RLE (or 1) for RLE run-length encoding

COMP_CODE_SKPHUFF (or 3) for Skipping Huffman compression

COMP_CODE_DEFLATE (or 4) for GZIP compression

The compression method parameters are specified by the parameter c_info in C and the parameter comp_prm in Fortran. The parameter c_info has type comp_info, which is described in the hcomp.h header file. It contains algorithm-specific information for the library compression routines.

The skipping size for the Skipping Huffman algorithm is specified in the field c_info.skphuff.skp_size in C and in the parameter comp_prm(1) in Fortran.

The deflate level for the GZIP algorithm is specified in the field c_info.deflate.level in C and in the parameter comp_prm(1) in the Fortran.

FORTRAN

integer mgscompress(ri_id, comp_type, comp_prm)

integer ri_id, comp_type, comp_prm(*)



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.