Click here to Skip to main content
Rate this: bad
good
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
SpaceSoft2.7K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here is a nice, well known, opensource project:
http://www.7-zip.org/[^]
 
Regards
Espen Harlinn
  Permalink  
Comments
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
good
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.
  Permalink  
Comments
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.
--SA
HimanshuJoshi at 18-Jan-11 12:09pm
   
There is a tar library to do this. http://www.destructor.de/libtar/index.htm

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

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 349
2 Richard MacCutchan 220
3 BillWoodruff 209
4 Mathew Soji 160
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 5 Oct 2011
Copyright © CodeProject, 1999-2014
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