Click here to Skip to main content
6,595,444 members and growing! (19,880 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)
Posted:15 Dec 2007
Views:4,533
Bookmarked:7 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
6 votes for this article.
Popularity: 1.45 Rating: 1.87 out of 5
4 votes, 66.7%
1

2

3

4
2 votes, 33.3%
5

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


Member

Location: United States United States

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Layout  Per page   
 Msgs 1 to 1 of 1 (Total in Forum: 1) (Refresh)FirstPrevNext
GeneralLicence costs not explained!!! PinmemberRay 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-2009
Web18 | Advertise on the Code Project