I am using delphi 7 and need to uncompress a compressed zip file which contains multiple files, I have found examples of how to unzip a single file using ZLib but cannot find any examples of this with muliple files in the zip, would it be possible for someone to either give me an example or point me in the direction of one
thanks
Colin
If you're having problems with zlib, maybe you might want to consider TurboPower's Abbrevia (available on SourceForge). With Abbrevia, here's our multiple-file extract code:
zip.ArchiveType := atZip ;
zip.ForceType := true ;
zip.OpenArchive({...your .zip archive name});
zip.BaseDirectory := {...your extract path...} ;
zip.OnConfirmOverwrite := Overwrite
zip.ExtractFiles('*');
There's options to handle extraction failure, confirmation of overwrites, etc. It's a pretty nice library to work with, and it's free.
There is an example in the zlib source distribution on zlib.net. Take a look at contrib/minizip/miniunz.c .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With