KI_COMP

Compress data

Synopsis:
CALL KI_COMP SYM(in_buf$), in_size, SYM(out_buf$) TO out_size
out_size = 'ki_comp( SYM(in_buf$), in_size, SYM(out_buf$) )
ArgumentEnumerationPurpose
SYM(in_buf$)Symbol of data to be compressed
in_sizeSize of source data
SYM(out_buf$)Symbol of output buffer
out_sizeSize of compressed data
>KI_COMP

KI_COMP

This compresses a buffer using the same algorithm as the Unix utility compress working with a 16 bit dictionary. This can be uncompressed later with KI_DCOMP.

If the output symbol is negative then the buffer will be re-dimensioned large enough to accomodate the compressed output.

KI_COMP may fail on data that is already compressed, in this case it will return a negative out_size, the contents of out_buf$ are undefined.

History
Introduced in KCML 3.00
See Also:
IP_TOS, KI_AES_DECRYPT, KI_AES_ENCRYPT, KI_COMPFILE, KI_CRYPT, KI_DCOMP, KI_DCOMPFILE, KI_DES_DECRYPT, KI_DES_ENCRYPT, KI_DF, KI_DFK, KI_DIR, KI_DIR_LIST, KI_DS, KI_MD5, KI_PID, KI_PMATCH, KI_SHA1, KI_SIZE, KI_STAT, KI_STATFS, KI_TOUCH, R7_DATE2J, R7_J2DATE
KCML database status codes