Solved

Extract a file from a Zip file

Posted on 2012-03-22
4
577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Post a good COM tutorial 1 68
Why is "packages element is not declared"? 2 459
Android development question 2 78
Infrastructure development vs software development 3 81
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

749 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