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

Zlib, C++, folder

P: n/a
Hello all,
I m not sure if it is the good newsgroup, please fu to the correct one
if you know (already tried comp.compression with no answer)

I m really knew to the use of the zlib in C++ to compress files. I think
I understand how to compress a single file but not how to compress a
whole folder containing subfolder and files.

Anyone have some links or hints ?
Thanks a lot,

Dlp
Jun 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
DLPnet wrote:
I m not sure if it is the good newsgroup, please fu to the correct one
if you know (already tried comp.compression with no answer)

I m really knew to the use of the zlib in C++ to compress files. I think
I understand how to compress a single file but not how to compress a
whole folder containing subfolder and files.

Anyone have some links or hints ?


The zlib API may or may not have functions to help do that, but in
either case, that is off-topic here since we discuss the standard C++
language here, not third-party libraries. If, however, you can compress
one file, just extend that to multiple files by iterating over the
other files and folders. To do that portably, you might use a library
such as Boost.Filesystem
(http://boost.org/libs/filesystem/doc/index.htm). Also, I'm sure you
can find the source to tar, which is a common way in UNIX to wrap up
files and directories for compression as one big file.

Cheers! --M

Jun 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.