[Top] [Prev] [Next] [Bottom]

SDsetchunk

intn SDsetchunk(int32 sds_id, HDF_CHUNK_DEF cdef, int32 flags)
sds_id

IN:

SD interface identifier returned from SDstart

cdef

IN:

Union containing information on how the chunks are to be defined

flags

IN:

Flags determining the behavior of the routine

Purpose

Determines the chunk size and the compression method, if any, to be applied when partitioning the array into chunks.

Return value

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

Description

SDsetchunk receives it's information on how to partition the array into chunks, as well as compression information, from a HDF_CHUNK_DEF union passed in as its second argument. This union structure is defined in the HDF library as follows:

typedef union hdf_chunk_def_u {
    int32 chunk_lengths[MAX_VAR_DIMS]; 
    struct {
        int32 chunk_lengths[MAX_VAR_DIMS]; 
        int32 comp_type;
        comp_info cinfo;
    } comp;
} HDF_CHUNK_DEF 

The flags parameter can either be set to HDF_CHUNK if the SDS is to be uncompressed, or to the bitwise-OR'ed values of HDF_CHUNK and HDF_COMP ( HDF_CHUNK | HDF_COMP) if a compression method is to be applied to the array while it is being partitioned into chunks.



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.