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