[Back to Interface] [Prev] [Next]

SDgetchunkinfo/sfgichnk

intn SDgetchunkinfo(int32 sds_id, HDF_CHUNK_DEF *cdef, int32 *flag)

sds_id IN:

Data set identifier returned by SDcreate or SDselect

C only:

cdef OUT:

Pointer to the chunk definition

flag OUT:

Compression flag

Fortran only:

dim_length OUT:

Array of chunk dimensions

flag OUT:

Compression flag

Purpose

Retrieves chunking information for a data set.

Return value

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

Description

SDgetchunkinfo retrieves chunking information about the data set identified by the parameter sds_id into the parameters cdef and flag in C, and to the parameters dim_length and flag in Fortran.

Currently, only information about chunk dimensions is retrieved into the corresponding cdef structure element for each type of compression in C, and in the dim_length array in Fortran. No information on compression parameters is available in the comp structure of the HDF_CHUNK_DEF union. Refer to the page on SDsetchunk in this manual for specific information on the HDF_CHUNK_DEF union.

The value returned in the flag parameter indicates the data set type (i.e., if the data set is not chunked, chunked, and chunked and compressed).

If the chunk length for each dimension is not needed, NULL can be passed in as the value of the cdef parameter in C.

The following table shows the type of the data set, possible values of the flag parameter, and the corresponding cdef structure element filled with the chunk's dimensions.

Type of Data Set
Values of flag in C
(Fortran)
cdef Structure Element Filled with the Chunk's Dimensions

Not chunked

HDF_NONE (-1)

None

Chunked

HDF_CHUNK (0)

cdef.chunk_lengths[]

Chunked and compressed with either the run-length encoding (RLE), Skipping Huffman or GZIP compression algorithms

HDF_CHUNK | HDF_COMP (1)

cdef.comp.chunk_lengths[]

Chunked and compressed with NBIT compression

HDF_CHUNK | HDF_NBIT (2)

cdef.nbit.chunk_lengths[]

FORTRAN

integer function sfgichnk(sds_id, dim_length, flag)

integer sds_id, dim_length(*), flag



[Back to Interface] [Prev] [Next]

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