Solved

Extract a file from a Zip file

Posted on 2012-03-22
4
568 Views
Last Modified: 2012-04-01
I have a zip file with some x number of files{only files and no folders}. I need to extract just the first file without unzipping the file and has to be implemented in C++/MFC.


Can some one suggest.
0
Comment
Question by:RsTVS
4 Comments
 
LVL 6

Expert Comment

by:crash2000
ID: 37751340
You could download and install winrar.
That gives you a little more flexibillity when extracting zip files.
It's here http://www.rarlab.com/
0
 
LVL 8

Assisted Solution

by:barrykfl
barrykfl earned 167 total points
ID: 37751369
For freeware u can use 7 zip www.7-zip.org/
0
 
LVL 20

Assisted Solution

by:n2fc
n2fc earned 166 total points
ID: 37751374
Info on zip file format:
http://en.wikipedia.org/wiki/Zip_(file_format)

Public source code reference for zip algorithm(s):
http://docs.bugaco.com/7zip/lzma.txt

http://docs.bugaco.com/7zip/readme.txt
0
 
LVL 7

Accepted Solution

by:
tampnic earned 167 total points
ID: 37762540
I went through this requirement a few months ago - the easiest open-source library I could find to go manipulate a Zip archive was InfoZip. I compile unzip60 as a static library and link the library into my executable.

I found the 7-zip SDK a bit overwhelming for simply unzipping an archive - the InfoZip library was very easy to understand and use. Its written in C but it only took me about an hour to write a C++ wrapper class for easier integration into my project.

http://www.info-zip.org/

Cheers,
   Chris
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SNMP error No Such Object available on this agent at this OID 3 189
windbg taking it's time 32 77
max float value 3 25
object oriented programming comparison 5 54
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now