#pragma once /** * Extracts all files from an NPK archive to a specified output directory. * * @param szNPKFileName The path to the NPK archive file to be extracted. * @param szOutputDir The path to the output directory where files will be extracted. * @return true if extraction succeeds; false otherwise. * * The function performs the following steps: * 1. Validates the input parameters. * 2. Creates or clears the output directory. * 3. Opens the NPK archive and retrieves the file list. * 4. For each file in the archive: * - Ensures the output path exists. * - Opens a stream to the file in the archive. * - Creates the corresponding output file. * - Copies the file data from the archive to the output file in chunks. * 5. Closes all resources and returns true on success, or false if any error occurs. */ bool extractNPKFiles(const char* szNPKFileName, const char* szOutputDir);