VMS Help  —  DCX Routines, DCX$COMPRESS_DATA
    The DCX$COMPRESS_DATA routine compresses a data record. Call this
    routine for each data record to be compressed.

    Format

      DCX$COMPRESS_DATA  context ,in_rec ,out_rec [,out_length]

1  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

    Longword condition value. Most utility routines return a
    condition value in R0. Condition values that this routine can
    return are listed under Condition Values Returned.

2  –  Arguments

 context

    OpenVMS usage:context
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Value identifying the data stream that DCX$COMPRESS_DATA
    compresses. The context argument is the address of a longword
    containing this value. DCX$COMPRESS_INIT initializes the value;
    you should not modify it. You can define multiple context
    arguments to identify multiple data streams that are processed
    simultaneously.

 in_rec

    OpenVMS usage:char_string
    type:         character string
    access:       read only
    mechanism:    by descriptor
    Data record to be compressed. The in_rec argument is the address
    of the descriptor of the data record string.

 out_rec

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by descriptor
    Data record that has been compressed. The out_rec argument is
    the address of the descriptor of the compressed record that
    DCX$COMPRESS_DATA returns.

 out_length

    OpenVMS usage:word_signed
    type:         word integer (signed)
    access:       write only
    mechanism:    by reference
    Length (in bytes) of the compressed data record. The out_length
    argument is the address of a word into which DCX$COMPRESS_DATA
    returns the length of the compressed data record.

3  –  Description

    The DCX$COMPRESS_DATA routine compresses a data record. Call this
    routine for each data record to be compressed. As you compress
    each record, write the compressed record to the file containing
    the compression/expansion map. For each record, write the length
    of the record and substring string containing the record to the
    same file.

4  –  Condition Values Returned

    DCX$_INVCTX        Error. The context variable is invalid, or the
                       context area is invalid or corrupted. This may
                       be caused by a failure to call the appropriate
                       routine to initialize the context variable or
                       by an application program error.
    DCX$_INVDATA       Error. You specified the item value DCX$C_
                       BOUNDED in the DCX$ANALYZE_INIT routine and
                       attempted to compress a data record (using
                       DCX$COMPRESS_DATA) that was not presented for
                       analysis (using DCX$ANALYZE_DATA). Specifying
                       the DCX$C_BOUNDED item value means that you
                       must analyze all data records that are to be
                       compressed.
    DCX$_INVMAP        Error; invalid map. The map argument was not
                       specified correctly in the DCX$ANALYZE_INIT
                       routine or the context area is invalid.
    DCX$_NORMAL        Normal successful completion.
    DCX$_TRUNC         Error. The compressed data record has been
                       truncated because the out_rec descriptor did
                       not specify enough memory to accommodate the
                       record.

    This routine also returns any condition values returned by
    LIB$ANALYZE_SDESC_R2 and LIB$SCOPY_R_DX.
Close Help