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
Solved

Extract a file from a Zip file

Posted on 2012-03-22
4
576 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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 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.

838 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