4

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Naruto
  • 9,476
  • 37
  • 118
  • 201

2 Answers2

5

For .NET, SharpZipLib.

See also: Zip library options for the Compact Framework?

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
  • Hey, Thanks i will look into this.. i hope i will be able to zip entire directory and sub-directories – Naruto Nov 10 '09 at 09:15
4

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
  • 189,189
  • 101
  • 473
  • 713