Compress an array using delta compression aryDelta
In practice, the scheme is limited currently to representing differences between adjacent values using a HDS integer data type (specified by argyument TYPE) - that is, arbitrary bit length is not yet supported. So for instance an _INTEGER input array can be compressed by storing differences as _WORD or _BYTE values, but a _WORD input array can only be compressed by storing differences as _BYTE values.
Any input value that differs from its earlier neighbour by more than the data range of the selected data type is stored explicitly using the data type of the input array.
Further compression is achieved by replacing runs of equal input values by a single occurrence of the value with a correspsonding repetition count.
It should be noted that the degree of compression achieved is dependent on the nature of the data, and
it is possible for the compressed array to occupy more space than the uncompressed array.
The compression factor actually achieved is returned in argument "
zratio"
(the ratio of
the supplied array size to the compressed array size). A minmum allowed compression
ratio may be specified via argument "
minrat"
. If the compression ratio is less than this
value, then the returned copy is left uncompressed.
An error will be reported if the supplied array does not hold integer values. In the case of a SCALED array, the internal (scaled) values must be integers, but the external (unscaled) values can be of any data type.
The compression axis and compressed data type actually used can be determined by passing the returned array to aryGtdlt.
An error will result if the array, or any part of it, is currently mapped for access (e.g. through another identifier).
An error will result if the array holds complex values.
’
_BYTE’
, ’
_WORD’
or ’
_INTEGER’
.
Additionally, a blank string may be supplied in which case a default value will be selected
that gives the greatest compression. "
compression"
actually expands the array storage). Note, the returned value of ZRATIO may be
smaller than MINRAT, in which case the supplied array is left unchanged. The returned
compression factor is approximate as it does not take into account the space occupied by the
HDS metadata describing the extra components of a DELTA array (i.e. the component
names, data types, dimensions, etc). This will only be significant for very small arrays.