Board index » cppbuilder » speed up extracing zipped files
didan
![]() CBuilder Developer |
speed up extracing zipped files2007-02-23 01:04:46 AM cppbuilder13 My data files are zipped. they can be as big as 100M. Here is the way I'm using to unzip the files. It takes long time to do it.Is there any way better? Thanks. STARTUPINFO si = {0}; PROCESS_INFORMATION pi = {0}; si.cb = sizeof (si); si.lpReserved = si.lpDesktop = si.lpTitle = NULL; si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; si.cbReserved2 = 0; si.lpReserved2 = 0; // unzip myFile to TempDir. AnsiString TempDir=HomeDir + "\\temp"; AnsiString exeFn = HomeDir + "\\pkzip25.exe"; char params[128]={0}; sprintf(params,"pack25 -extract -silent %c%s%c %c%s",'"', myFile.c_str(),'"','"',TempDir.c_str()); CreateProcess(exeFn.c_str(), params,NULL, NULL, TRUE, CREATE_NEW_CONSOLE,NULL, NULL,&si, &pi); WaitForSingleObject (pi.hProcess,INFINITE); |