Compression and Expansion Services

You can save data in a compressed format to conserve storage media and network transmission line costs. The CSRCMPSC macro provides a pair of services that compress and expand data. These services are available when the CVTCMPSC bit is on in the communication vector table (CMSCVT).

Compression takes an input string of data and, using a data area called a dictionary, produces an output string of compression symbols. Each symbol represents a string of one of more characters from the input.

Expansion takes an input string of compression symbols and, using a dictionary, produces an output string of the characters represented by those compression symbols.

Parameters for the CSRCMPSC macro are in an area mapped by DSECT CMPSC of the CSRYCMPS macro and specified by the CBLOCK parameter of the CSRCMPSC macro. This area contains the following information:
  • The address, ALET, and length of a source area. The source area contains the data to be compressed for a compression operation, or to be expanded for an expansion operation.
  • The address, ALET, and length of a target area. After the macro runs, the target area contains the compressed data for a compression operation, or the expanded data for an expansion operation.
  • An indication of whether to perform compression or expansion.
  • The address and format of a dictionary to be used to perform the compression or expansion. The dictionary must be in the same address space as the source area.