9.2 Data Decompression

Applications can call the functions in LZEXPAND.DLL to decompress files compressed with COMPRESS.EXE. The functions can also process uncompressed files without attempting to decompress them.

The following table describes each function found in LZEXPAND.DLL:

Function Purpose

CopyLZFile Copies a source file to a destination file. If the source file was compressed, this function creates a decompressed destination file. If the source file was not compressed, this function duplicates the original file. This function is intended for multiple-file copy operations.
GetExpandedName Retrieves the original name of a compressed file if the /r switch was used during compression of the file.
LZClose Closes a file that was opened when the application called the LZOpenFile or the OpenFile function.
LZCopy Copies a source file to a destination file. If the source file was compressed, this function creates a decompressed destination file. If the source file was not compressed, this function duplicates the original file. This function is intended for single-file copy operations.
LZDone Frees memory allocated by the LZStart function. The LZStart and LZDone functions are used with the CopyLZFile function to copy multiple files.
LZInit Creates structures that are used for decompressing files.
LZOpenFile Opens a file. If the file was compressed, this function returns a special file handle that identifies the compressed file; if the file was not compressed, this function returns an MS-DOS file handle.
LZRead Reads a specified number of bytes from a file. If the file was compressed, this function decompresses the bytes before copying them to the destination buffer.
LZSeek Positions the file pointer within the decompressed image of a compressed file. The application calls this function to position the pointer prior to calling the LZRead function.
LZStart This function allocates memory for multiple-file copy operations.

For more information about individual functions, see the Microsoft Windows Programmer's Reference, Volume 2.