5,542,300 members and growing! (18,008 online)
Email Password   helpLost your password?
Languages » C# » How To License: The Code Project Open License (CPOL)

File Compression with ZipForge .NET Library

By satya r

File Compression with ZipForge .NET Library
C# (C# 2.0, C# 3.0, C#)

Posted: 15 Dec 2007
Updated: 15 Dec 2007
Views: 1,746
Bookmarked: 4 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
5 votes for this Article.
Popularity: 1.21 Rating: 1.73 out of 5
4 votes, 80.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
0 votes, 0.0%
4
1 vote, 20.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

Compression and De-Compression with ZipForge ZipForge.NET Library, Supported IDEs include Microsoft Visual Studio 2003, 2005.

Background

ZipForge does more than just compress and decompress data. Lots of algorithms can be used to compress the data files. For ex: Ace128,Ace192,Ace256 etc. Creating and managing a zip file is easy.

Compression of the Files

Blocks of code should be set as style "Formatted" like this:

ComponentAce.Compression.ZipForge.ZipForge zip = new ComponentAce.Compression.ZipForge.ZipForge();
zip.EncryptionAlgorithm = ComponentAce.Compression.Archiver.EncryptionAlgorithm.Aes128;
zip.FileName = "C:\\Download\\test.zip";  
zip.Password = "satyarapelly";
zip.OpenArchive(System.IO.FileMode.Create);
foreach (string inputFileName in inputFileNames)
{
   zip.AddFiles(inputFileName);
}
zip.CloseArchive();


		

De-Compression of the Files


ComponentAce.Compression.ZipForge.ZipForge zip = new ComponentAce.Compression.ZipForge.ZipForge();
zip.FileName = "C:\\Download\\test.zip";  
if (System.IO.File.Exists(zip.FileName))
   zip.OpenArchive(System.IO.FileMode.Open);

zip.BaseDir = textBox4.Text;
zip.Password = textBox2.Text;
zip.ExtractFiles("*.*");
zip.CloseArchive();

by Satya Rapelly

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

satya r



Location: United States United States

Other popular C# articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Search Search Messages 
 Layout  Per page   
 Msgs 1 to 1 of 1 (Total in Forum: 1) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralLicence costs not explained!!!memberRay Hayes12:40 15 Dec '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 15 Dec 2007
Editor:
Copyright 2007 by satya r
Everything else Copyright © CodeProject, 1999-2008
Web15 | Advertise on the Code Project