KI_COMPFILE
Argument | Enumeration | Purpose |
---|---|---|
srcfile$ | Name of source file to compress | |
dstfile$ | Name of target file | |
status | KDB_ERROR_ENUM | Return status |
size | Size of the compressed file |
KI_COMPFILE
This compresses a file using the same algorithm as the Unix utility compress working with a 16 bit dictionary. The file can be uncompressed later with KI_DCOMPFILE or the Unix uncompress command.
If the dstfile$ parameter is blank, then the filename of the compressed file will be srcfile$ with a .Z suffix appended. The original file will be removed, if the file was successfully compressed. This mimics the behaviour of
$ compress myfile
If dstfile$ is not blank, then this value will be is used to name the compressed file. The original file, srcfile$, will not be removed, this emulates
$ cat myfile | compress -c > compressedFile
The size of the compressed file is stored in the optional size parameter.