Reputation: 31
I'm new to c# and programming in general. I've started to create my own powerpoint plugin. I've got it to where a user can browse for a zip file but now I need to know - How do I parse information from a file within that zip or compound file in c#?
Do I have to use a library? If so how do I go about that?
Upvotes: 0
Views: 734
Reputation: 137487
As others have mentioned, the System.IO.Compression
namespace has the ZipFile
class for creating/extracting zip files. However, they are only available in .NET 4.5 however, which is currently only available as part of the Visual Studio 2012 RC.
See System.IO.Compression
in:
Up until this point, the de-facto standard for working with zip files in .NET has been the DotNetZip Library. It is available under the open-source MS-PL license.
Also see:
Upvotes: 2
Reputation: 50346
To work with ZIP-files in general, use the ZipArchive
class that represents a ZIP file, or the members of the static ZipFile
class to work with ZIP files, and use the DeflateStream
class to read the contents of a compressed file.
To easily read the contents of a binary file, use the BinaryReader
class. Otherwise, use the StreamReader
class for text files.
Upvotes: 1