Click here to Skip to main content
11,706,979 members (53,620 online)
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 4: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 Sergey Alexandrovich Kryukov 145
1 OriginalGriff 141
2 chainerlt 110
3 Maciej Los 80
4 ppolymorphe 79
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,512
2 CPallini 5,189
3 Maciej Los 4,766
4 Mika Wendelius 3,696

Advertise | Privacy | Mobile
Web03 | 2.8.150819.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