?
Solved

Decompress old IMPLODE zip file with C#

Posted on 2009-04-20
7
Medium Priority
?
1,451 Views
Last Modified: 2013-12-01
I've got some zip files coming from a very old mainframe that I would like to decompress.  They will unzip with the built in windows "compressed folders" utility and older version of winzip (I read that version 12 no longer supports deflate), but I want to automate it.  Free libs like SharpZipLib or ZipLib are out as they are mostly based on the built in (and much more common) "deflate" algorithm.  Can anybody direct me to a component that will handle the decompression of these files?  I'd even settle for the shareware command line version of pkunzip if such a thing exists anymore (although a component would be my first choice).
0
Comment
Question by:b_levitt
  • 3
  • 3
7 Comments
 
LVL 11

Author Comment

by:b_levitt
ID: 24190896
By the way 7zip seems to be my command line option:
http://www.7-zip.org/

I'd still be interested in a component though.
0
 
LVL 7

Expert Comment

by:zwei
ID: 24408200
0
 
LVL 7

Expert Comment

by:zwei
ID: 24408206
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 11

Author Comment

by:b_levitt
ID: 24440135
Just about anything recent regarding creating zip files uses the 'deflate' algorithm.  These old files I have were zipped using implode (the old pkzip format).  I doubt anything exists but I thought I would ask.
0
 
LVL 7

Accepted Solution

by:
zwei earned 1400 total points
ID: 24440351
Sorry, I didn't read the question carefully. No, there's no library to do this kind of thing that I know of, but since you can do it from the command line with 7-zip you can use Process instead:


foreach (FileInfo fileInfo in DirecInfo.GetFiles("*.zip"))
{
       Process process = new Process();
       process.StartInfo.FileName = @"C:\Program Files\7-zip\7z.exe";
       process.StartInfo.Arguments = @" e C:\Directory\" + fileInfo.Name + @" -oC:\Directory";
       process.Start();
}

Open in new window

0
 
LVL 21

Assisted Solution

by:MogalManic
MogalManic earned 600 total points
ID: 24441255
Here is the tech. specs for the old zip formats:
  http://www.info-zip.org/doc/
you COULD write your own implementation.  

Or try the file against all of the various zip libraries out on the net
   http://dotnetzip.codeplex.com/
   http://www.info-zip.org/UnZip.html (library only, you would have to write a PINVOKE wrapper)
   http://zlib.net/
   
Here is a thread asking the same question:
  http://www.groupsrv.com/science/about8932.html
You could use the 7zip librarys in c# code:
  http://www.codeproject.com/KB/DLL/cs_interface_7zip.aspx?display=PrintAll&fid=1427631&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=51&select=2834300
0
 
LVL 11

Author Closing Comment

by:b_levitt
ID: 31572570
Thanks for the effort zwei.  Thanks for a couple of those links Mogal.
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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

571 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