int LZInit(hfSource) | |||||
INT hfSource; | /* handle identifying source file | */ |
The LZInit function allocates memory for, creates, and initializes the internal data structures which are required to decompress files.
hfSource
Identifies the source file.
If the function is successful and the file is not compressed, the return value is the original file handle; if the function is successful and the file is compressed, the return value is a new file handle. If the function fails the return value is less than zero. The following list identifies possible error return values and their meaning:
Value | Meaning |
LZERROR_BADINHANDLE | The handle identifying the source file, hfSource, was not valid. |
LZERROR_READ | The source file format was not valid. |
LZERROR_GLOBALLOC | There is insufficient memory for the required internal data structures. This value is returned when an application attempts to open more than 16 files. |
LZERROR_GLOBLOCK | The handle identifying the file is invalid. |
LZERROR_UNKNOWNALG | The file was compressed with an unrecognized compression algorithm. |
A maximum of 16 compressed files can be open at any given time.