Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ Windows Linux
Hi all, I need a zip library (or a function) that can zip\unzip a few files, i tried zlib or gzip I can't find a solution to archive more than one file in a single .zip (or .tar, or .gzip).
Does anyone have ideas?
Thank you very much
Posted 18-Jan-11 5:53am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Here is a nice, well known, opensource project:[^]
Espen Harlinn
SAKryukov at 18-Jan-11 11:27am
This one is the best, looks like - a 5.
Espen Harlinn at 18-Jan-11 11:48am
Thanks SAKryukov!
Marcus Kramer at 18-Jan-11 11:54am
7zip is a great project. It works really well.
Espen Harlinn at 18-Jan-11 11:59am
Thanks Marcus - It's a great utility
SpaceSoft at 19-Jan-11 9:03am
I solved using minizip, thank you anyway ;)
Espen Harlinn at 19-Jan-11 9:12am
That's good :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To archive multiple files with zlib you need to pack all of them with tar archive first. Tar won't compress the files it just packs multiple files into one. After packing multiple files using tar, apply zip compression on tar archive file.
SAKryukov at 18-Jan-11 11:29am
Can you answer, where to get Tar functionality? Is is needed? -- the question is about doing all programmatically...
Thank you.
HimanshuJoshi at 18-Jan-11 12:09pm
There is a tar library to do this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 410
1 Sergey Alexandrovich Kryukov 370
2 Maciej Los 285
3 ProgramFOX 275
4 CHill60 260
0 OriginalGriff 360
1 ProgramFOX 265
2 Maciej Los 235
3 CHill60 200
4 RyanDev 170

Advertise | Privacy | Mobile
Web04 | 2.8.150331.1 | Last Updated 5 Oct 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100