The Zip package provides services for compressing and decompressing files. The major functionalities offered in the Zip Package are the following:



Error ERROR
Unknown error constant.
Error FILENOTFOUND
File not found error constant.
Error NOTAFILE
The input file for Decompress() is not a file error constant.
Error NOWRITEPERMISSION
The output archive file for Compress() does not have write permission error constant .
Integer OK
Success return constant.

Integer Compress( String outFilename, String inFilename
)
Compress file or directory, inFilename, to an archive file, outFilename.
| outFilename | - | Name of target archive file. |
| inFilename | - | Name of source file or directory to be compressed. |
| OK | Compression successful |
| FILENOTFOUND | inFilename does not exist |
| NOWRITEPERMISSION | outFilename does not have write permission |
| ERROR | any other errors |
Integer Decompress( String outDirname, String inFilename
)
Decompress an archive file, inFilename, to directory, outDirname.
| outDirname | - | Name of target directory where decompression will occur. If outDirname does not exist then it will be created. |
| inFilename | - | Name of source archive file to be decompressed. |
| OK | Decompression was successful |
| FILENOTFOUND | inFilename does not exist |
| ERROR | any other errors |