Click to See Complete Forum and Search --> : GunZipped files are not portable between UNIX and WINDOWS


chittu24in
March 19th, 2005, 06:49 AM
Hi EveryBody,

I'm facing one problem, when I'm trying to Archieve a zipped file using zlib library. Actually the input .gz file is generated in UNIX OS and I'm extracting same file in WINDOWS OS. At the time of Extract file, it fails and throws bad file format.

Here i'm attaching code:

CString csFileName("D:\\test.gz");
CZipArchive cZip;
cZip.Open("D:\\test.gz",CZipArchive::open);
for(WORD i = 0; i < cZip.GetNoEntries(); i++)
cZip.ExtractFile(i,'D:\\output");

cZip.Close();

I got the ZIP library code from developer.com

Please help me out.

Thanks in advance.
Sahoo