BT

Your opinion matters! Please fill in the InfoQ Survey!

Using 7-Zip's Compressing/Decompressing Functionality from a .NET Application

| by Abel Avram Follow 4 Followers on Jun 26, 2008. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Eugene Sichkar, a software developer, has published a project containing a .NET/C# interface to the 7-Zip archiving application on Code Project. 7-Zip is an open source application used to archive/un-archive files in various formats.

7-Zip is an open source archiving application supporting the following formats according to 7-Zip's web site:

    • Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
    • Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, MSI, WIM, Z, CPIO, RPM, DEB and NSIS

7-Zip currently runs on all desktop versions of Windows starting with Windows 98 to Vista. There is an effort going on to port it to Linux/Unix. 7-Zip is free and licensed under GNU LGPL license, and the UnRAR module is licensed with some restrictions.

Eugene Sichkar, a software developer, has created a C# interface to the 7-Zip DLLs included in the 7-Zip application, allowing anyone to use the 7-Zip compressing/decompressing capabilities from within a .NET application. The following interfaces are implemented according to Eugene:

    • IProgress - basic progress callback
    • IArchiveOpenCallback - archive open callback
    • ICryptoGetTextPassword - callback for prompt password for archive
    • IArchiveExtractCallback - extract files from archive callback
    • IArchiveOpenVolumeCallback - open additional archive volumes callback
    • ISequentialInStream - simple read-only stream interface
    • ISequentialOutStream - simple write-only stream interface
    • IInStream - input stream interface with seek capability
    • IOutStream - output stream interface
    • IInArchive - main archive interface

Using the .NET interface one accesses the 7-Zip functionality (7z.dll) directly not via a console line, or a console line wrapper. The interface is released under the The Common Development and Distribution License (CDDL). Downloading the C# source code requires registration with Code Project.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

have bug on 7z.dll 4.75 by Pan Jason

I Can't Extract .Cab and .LZMA Archive use C# Interface Wrapper,in condition when the other Archive,i view 7zip C++ source code, the Cab COM+ GUID 23170f69-40c1-278a-1000-000110080000 is right,could you help me?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT