initial commit

This commit is contained in:
2025-09-01 20:47:58 +08:00
commit 12c51b5ddb
843 changed files with 475321 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#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);