Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Folder Compression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bishoy - 29 Jun 2007 17:54 GMT
Can GZipStream class compress an entire directory not only a file?
If not, how to compress a directory?
Thanks.
Sivakumar G - 01 Jul 2007 15:44 GMT
Bishoy,

GZipStream works on data streams. You have at least two choices here.

1) This approach would require you to create a custom class which would
represent an archive where you can have foldrs and file information. This
would be the hard way to do our job but would be fun to do. The archive class
will hold either folder or file class objects. Obviously the folder class
will be capable of holding multiple compressed file steam data. You will need
to add logic to scan the given folder, iterate through it recursively to
compress the files and building a  memory tree structure. Then we can
serialize this class object using BinaryFormater to be able to be
deserialized later on.

2) This would be to use open zip library like charpziplib which will make
you life much easier.

Go for 1) if you have sometime to work on this or go for 2) if you are too
late for experiments.

HTH

Siva

> Can GZipStream class compress an entire directory not only a file?
> If not, how to compress a directory?
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.