6 people following this project (follow)

Welcome to Shetab Mount Zip Library

Mount and use zip archive in your application without unzip any files and folders! This is new approach to work with zip file in your applications.

FAQ

Why you need to mount zip files instead using simple zip tools?
What's the benefit of Shetab Mount Zip Library via the mounting tools?
What's the benefit of Shetab Mount Zip Library via the other packer tools?
See FAQ for more information.

Features

Mount Features
  • Simulate files and folders in zip archive file 100% transparently in application process to look as virtual folder.
  • Only application that mount zip archive can see and access to mapped files.
  • Mount more than one zip archive file at same time.
  • Files never extracted to disk.
  • No driver installation needed.
  • Run in user mode (No administrator privilege required).
  • Multithread support.
Advanced Features
  • Support IStorage and IStream for zip file.
  • Additional IZipStorage and IZipStream derived from IStorage and IStream.
  • Ability to seek directly into zip file even encrypted stream without losing performance.
  • Full Source Code.
Zip Features
  • Zip64 Support: Large files support and support for unlimited number of files in archives.
  • Unicode support in archives compatible with WinZip.
  • Strong encryption: AES-128, AES-192, AES-256 compatible with WinZip.
See Features for more information.

What is this project?

This project is .NET class wrapper for Shetab Mount Zip Library APIs, it also contain a sample project that demonstrate how to use this class wrapper. This class can be used in any .NET languages. You can use this class wrapper in various ways. A sample is included in this project, The sample will show you the simple operations like "Add File", “Add Folder", "Extract File" and "Extract Folder" on zip files. You will also see how the zip archive file map to your current process as read-only such as virtual folder. Every component in your program can access to content of zip file transparently, without even knowing them exist in zip file!

You will see how all files and folders in zip archive treat as normal system files and folders, in other word Shetab Mount Zip Library make your zip archive file look as virtual folder for your running process. This virtual folder only available for calling process.

Note: that file and folder never extracted from zip archive and all operation perform in memory.

How to use this sample?

Press "Select File to View" to see how "Standard Open File Dialog" show contents of test.zip file as normal file. You will see all files in "Standard Open File Dialog" with green or blue colour (depend on windows version). because the Mount Zip Library tell windows that files were compressed and encrypted, you can select one of these files and see how this "web browser" inside program simply navigate and show the file, while the file not extracted and even just exist in zip folder!

You can open database such as mdb or see movie with media player control in same way without extract files.
Just press "Add Files" or "Add Folder" to append files or folder to test.zip file. You can find test.zip in folder of this sample.

Example Usage

Here's some C# code that mount a zip archive file.

//Create an object of IPacker to access other Shetab Mount Zip library objects
IPacker Pakcer;
IBoxManager BoxManager;
Pakcer = PackerHelper.Create(); //Create an object of IPacker
Pakcer.CreateBoxManager("", out BoxManager); //Create BoxManager for Mount Zip File
string ExeFolder =  Path.GetDirectoryName(Application.ExecutablePath); //just current executable folder

//open zip archive as storage from existing zip file.
IZipStorage zipStorage;
Pakcer.OpenZipStorage("test.zip", "", true, out zipStorage);

//Mount
BoxManager.AddBox(zipStorage, ExeFolder); //Mount zip file to current folder
BoxManager.Mount();

//From now you can use any IO operaton such as File.Open, File.ReadAllLines, ...
//You have read-only access to the contents of zip archive same as normal file.
//The contents of zip file looks extracted in exefolder but actually they don't extract anywhere in anytime.

IStorage and IStream implementation for zip file

If you don't want use Mount technique to map the zip archive in your process you can use IZipStorage and IZipStream interface.
IStorage and IStream are common COM interfaces for Windows Programmers, Shetab Mount Zip Library implement this interfaces for read-only operations. IZipStorage and IZipStream are interfaces that derived from COM IStorage and IStream interface.
These interfaces are available in .NET programmers, too. If you want to use standard .NET Stream class, you can use Shetab.Packer.ComStream to convert COM IStream or IZipStream to .NET Stream. Shetab.Packer.ComStream derived from .NET Stream class and you can pass IStream or IZipStream reference to its constructor and work with .NET Stream.

How this zip library mount zip files?

This Zip Library creates a user mode layer between your application process and windows kernel IO APIs. Any call to kernel will be redirected and handled at runtime, so your program and of used component in your program process will see inside of zip files and folder as standard file system. See the following diagram:
Shetab Mount Zip Library Diagram

Full Version

This project is .NET class wrapper for Shetab Mount Zip Library APIs; you can replace ShetabPacker.dll with full version to get full functionality.
To get full version of Shetab Mount Zip Library click Full Version.

More Questions?

Please feel free to ask your questions in Discussions.

Programming Language Support

Shetab Mount Zip Library can use in following Languages:
Visual C++ (Windows, ATL, MFC)
Visual Basic .NET
Visual C#

Last edited Jan 26 2010 at 11:25 PM by Madnik7, version 63