Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
I want to access the contents of a zip file. eg: Say I want to read a text file inside a zip file. How would I declare the file path?
Posted

.NET Framework has introduced GZipStream and DeflateStream classes for compression and decompression of streams.
Pong D. Panda have already given perfect link about GZipStream and
take a look there-[DeflateStream][^] for more details about DeflateStream
 
Share this answer
 
The streams mentioned in the other solutions allow you to read and write a compressed file. A ZIP file (and other archive formats like .gz, .tar etc) are more than just a compressed file, there is a significant amount of structure and you can't just read one in with one of these streams.

I suggest that you use SharpZipLib[^]. It's open source but you're allowed to use it in a proprietary solution.
 
Share this answer
 
Using google, you can find this.[^]
 
Share this answer
 
Comments
Codemonkey3 14-Apr-11 4:24am    
Thanks, Just what I was looking for :)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900