By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,241 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,241 IT Pros & Developers. It's quick & easy.

zlib question ...

P: n/a
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


Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 6 Jan 2004 17:11:35 -0800, "Peter" <ya*******@ncr.com> wrote
in comp.lang.c++:
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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #2

P: n/a
Jack Klein wrote:
On Tue, 6 Jan 2004 17:11:35 -0800, "Peter" <ya*******@ncr.com> wrote
[redacted]
Yes, there's a bug in your code on line 42.

Nah. I think it's on 47.

Jul 22 '05 #3

P: n/a
Peter wrote:
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.
Jul 22 '05 #4

P: n/a
On Tue, 6 Jan 2004 17:11:35 -0800, "Peter" <ya*******@ncr.com> wrote:
Hi,

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


No ... try comp.compression instead.
--
Bob Hairgrove
No**********@Home.com
Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.