KI_DCOMPFILE

Uncompress a file

Synopsis:
CALL KI_DCOMPFILE srcfile$, dstfile$ TO status, [size]
'ki_dcompfile( srcfile$, [dstfile$], size )
ArgumentEnumerationPurpose
srcfile$Name of source file to compress
dstfile$Name of target file
statusKDB_ERROR_ENUMReturn status
sizeSize of the uncompressed file
>KI_DCOMPFILE

KI_DCOMPFILE

This expands a file previously compressed by KI_COMPFILE using the same algorithm as the Unix utility compress working with a 16 bit dictionary.

If the dstfile$ parameter is blank, the original file will be overwritten. If the filename of the original file, srcfile$, contains a .Z suffix, then this will be removed. This mimics the behaviour of

$ uncompress myfile

and

$ uncompress myfile.Z

Both of which uncompress to a file called myfile.

If dstfile$ is not blank, then the original file will not be removed or overwritten. This emulates

$ cat myfile.Z | uncompress -c > myfile

The size of the uncompress file is stored in the optional size parameter.

History
Introduced in KCML 6.20
See Also:
IP_TOS, KI_AES_DECRYPT, KI_AES_ENCRYPT, KI_COMP, KI_COMPFILE, KI_CRYPT, KI_DCOMP, 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