You need an external library. There is zlibce.dll, a native DLL that you can use if C ++ is your thang.
If .NET is your thing, I can recommend DotNetZip , which runs on .NETCF 2.0, is free, open source, and has a good document, good performance. The source DotNetZip distribution has a CF-Unzipper project that you can view and compile; It demonstrates how to unzip files on a device. Here is a link where you can view the code for the device.
This is a snippet of zip-important pieces of code. It is unpacked into a directory that takes its name from the zip file (without the .zip extension).
private void UnzipSelectedFile()
{
string parent = System.IO.Path.GetDirectoryName(_selectedpath);
string dir = System.IO.Path.Combine(parent,
System.IO.Path.GetFileNameWithoutExtension(_selectedpath));
try
{
using (var zip1 = new Ionic.Zip.ZipFile(_selectedpath))
{
foreach (var entry in zip1)
{
entry.Extract(dir, true);
}
}
AddChildren(tvFolders.SelectedNode.Parent);
}
catch (Exception ex)
{
MessageBox.Show("Exception! " + ex);
}
}
Here is a link to the online version of the document for the library.
source
share