zlib question ...

P

Peter

Hi,

Not sure if this is a proper ng to post this question.

Is here anybody who has used zlib? I downloaded 1.2.1 of zlib from
www.gzip.org/zlib (for windows 98/nt/2000/xp), and used it in my program to
zip/unzip files. When I use the zipper class in zlib to zip a folder, I got
a zip file with the SAME SIZE of zip file created (on the same folder) with
the 'ZipTest' program downloaded from the site. But the problem is that the
zip file created with my program can't be opened by WinZip - it showed the
empty dialog, and 'Extract' 'View' and 'Checkout' button in the dialog are
disabled; while the one created by 'ZipTest' can be opened (and extracted)
by WinZip.

Anybody got idea what's wrong with my zip file?

Thanks,
Peter
 
J

Jack Klein

Hi,

Not sure if this is a proper ng to post this question.

Is here anybody who has used zlib? I downloaded 1.2.1 of zlib from
www.gzip.org/zlib (for windows 98/nt/2000/xp), and used it in my program to
zip/unzip files. When I use the zipper class in zlib to zip a folder, I got
a zip file with the SAME SIZE of zip file created (on the same folder) with
the 'ZipTest' program downloaded from the site. But the problem is that the
zip file created with my program can't be opened by WinZip - it showed the
empty dialog, and 'Extract' 'View' and 'Checkout' button in the dialog are
disabled; while the one created by 'ZipTest' can be opened (and extracted)
by WinZip.

Anybody got idea what's wrong with my zip file?

Thanks,
Peter

Yes, there's a bug in your code on line 42.
 
S

Somebody

Peter said:
When I use the zipper class in zlib to zip a folder, I got
a zip file with the SAME SIZE of zip file created (on the same folder) with
the 'ZipTest' program downloaded from the site.

I can't find any "zipper" class in zlib, nor can I find ZipTest.
But the problem is that the
zip file created with my program can't be opened by WinZip - it showed the
empty dialog, and 'Extract' 'View' and 'Checkout' button in the dialog are
disabled; while the one created by 'ZipTest' can be opened (and extracted)
by WinZip.

zlib only implements the zip inflate and deflate algorithms, not zip
file archives. To make actual zip files, look at the code in
contrib/minizip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,413
Latest member
ReeceDorri

Latest Threads

Top