views:

233

answers:

2

I need to zip and unzip the directory hirarchy in Windows Mobile using C++/C#. What is the simplest library available for it?

I have googled many times. I found some stuff, but I am not able to go ahead with it.

If you have implemented or if you know some stuff about it please let me know.

+5  A: 

For .NET, SharpZipLib.

See also: Zip library options for the Compact Framework?

Mitch Wheat
Hey, Thanks i will look into this..i hope i will be able to zip entire directory and sub-directories
Shadow
+2  A: 

DotNetZip is a .NET library, has a build for .NET CF.

There's a .NET CF sample application delivered with the devkit. It is a CF app that unzips files on the device.

alt text

The code that does the unzipping looks like this:

using (var zip1 = Ionic.Zip.ZipFile.Read(_selectedpath))
{
    foreach (var entry in zip1)
    {
        entry.Extract(dir, ExtractExistingFileAction.OverwriteSilently);
    }
}

// now, re-populate the treeview with the extracted files:
AddChildren(tvFolders.SelectedNode.Parent);
Cheeso