Create a compressed copy of an NDF using SCALE compression NDF_ZSCAL
’
s DATA component (e.g. ’
_REAL’
or ’
_INTEGER’
). "
Notes:"
below. On exit, any
supplied values will be rounded to values that can be represented accurately in the data
type of the input NDF. "
Notes:"
below. On exit, any supplied values will be rounded to
values that can be represented accurately in the data type of the input NDF. The compressed data may not be of type _DOUBLE. An error will be reported if TYPE is
’
_DOUBLE’
.
Only arrays that are stored in SIMPLE or PRIMITIVE form can be compressed. An error is reported if any other storage form is encountered whilst compressing the input NDF.
The uncompressed array values are obtained by multiplying the compressed values by SCALE and then adding on ZERO.
The default scale and zero values (used if VAL__BADD values are supplied for SCALE and/or ZERO) are chosen so that the extreme array values will fit into the dynamic range of the output data type, allowing a small safety margin.
Complex arrays cannot be compressed using this routine. An error will be reported if the input NDF
has a complex type, or if "
TYPE"
represents a complex data type.
The resulting NDF will be read-only. An error will be reported if an attempt is made to map it for WRITE or UPDATE access.
When the output NDF is mapped for READ access, uncompression occurs automatically. The pointer returned by NDF_MAP provides access to the uncompressed array values.
The result of copying a compressed NDF (for instance, using NDF_PROP, etc.) will be an equivalent uncompressed NDF. SCALE( 2 ) = DOUBLE PRECISION (Given)
When applied to a compressed NDF, the NDF_TYPE and NDF_FTYPE routines return information about the data type of the uncompressed NDF.
If this routine is called with STATUS set, then a value of NDF__NOID will be returned for the INDF2 argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason. In either event, the placeholder will still be annulled. The NDF__NOID constant is defined in the include file NDF_PAR.