Constants

Constants used by the library.

General Constants

Compression Method

ZIPAPI_DEFLATED%
ZIPAPI_DEFLATED is used internally by ZipApi_AddFile, and specifies that the function should compress files that are being added.

Append modes for ZipApi_CreateZip

ZIPAPI_APPEND_CREATE%
If ZipApi_CreateZip is called with this mode, a new zip file will be created. If the file already exists, it will be overwritten.
ZIPAPI_APPEND_CREATEAFTER%
If ZipApi_CreateZip is called with this mode, the file will be opened and the ZIP data appended to the end of it.
ZIPAPI_APPEND_ADDINZIP%
If ZipApi_CreateZip is called with this mode, the ZIP file will be opened and new files added to it.

Compression Levels

ZIPAPI_DEFAULT_COMPRESSION%
Instructs the compress function to use the default compression level.
ZIPAPI_NO_COMPRESSION%
The data will not be compressed.
ZIPAPI_BEST_SPEED%
The data will be compressed at the best speed, with the lowest space saved.
ZIPAPI_BEST_COMPRESSION%
The data will be compressed at the highest level of compression, saving the most space. This is the slowest compression level.

Function Return Constants

If a function does not return a handle to a resource, it will return one of the following constants unless otherwise stated.

ZIPAPI_OK%
ZIPAPI_OK is from a function when it has completed successfully.
ZIPAPI_EOF%
Returned when the end of a file has been reached.
ZIPAPI_STREAM_END%
Returned when the end of a ZIP stream has been reached. This is not used in the current version of the library.
ZIPAPI_NEED_DICT%
Returned if the function requires a data dictionary to be generated. This is not used in the current version of the library.
ZIPAPI_ERRNO%
Returned when an error was caused by the file system, not Zlib. This is not used in the current version of the library.
ZIPAPI_STREAM_ERROR%
Returned when an invalid compression level was used when calling deflateInit. This is not used in the current version of the library.
ZIPAPI_DATA_ERROR%
The data in a bank was corrupted or incomplete.
ZIPAPI_MEM_ERROR%
Returned when there was insufficient memory to complete the operation.
ZIPAPI_BUF_ERROR%
Returned if there the output buffer was not large enough.
ZIPAPI_VERSION_ERROR%
The zlib library version is incompatible with the version assumed by the caller. Not used in this version.
ZIPAPI_END_OF_LIST_OF_FILE%
Returned when there are no more files in the zip. Use this in conjunction with ZipApi_GotoNextFile to iterate through a zip's contents.
ZIPAPI_PARAMERROR%
A function was called with incorrect parameters.
ZIPAPI_BADZIPFILE%
The zip file is corrupt or invalid.
ZIPAPI_INTERNALERROR%
There was an internal library error.
ZIPAPI_CRCERROR%
There was a CRC error.

Custom Error Codes

These error codes are used by the ZipApi wrapper, and will not be returned by the userlib functions.

ZIPAPI_INVALIDPOINTER%
ZIPAPI_INVALIDPOINTER is returned when a wrapper function is called with an invalid ZIP file pointer.
ZIPAPI_INVALIDBANK%
ZIPAPI_INVALIDBANK is returned when a wrapper function is passed an invalid Blitz bank handle.