Using GZipStream to explore a zip file
Posted on 2012-08-26
Hello, I am writing a VB.NET program, and I'd like to just do a quick scan of a ZIP file to make sure it contains a small file called info.txt (and maybe look at the contents, not completely necessary). I'm not sure if I have to decompress it to do this -- I'd rather not because the entire ZIP file is pretty big.
I'm not sure if it is possible to inspect w/o extracting, OR to just extract a single file info.txt, w/o doing the very slow (since lots of big files) decompression.
Anyway, since it's VB.NET the
namespace is available to me, with the GZipStream class. The example code for this class talks about compression and decompression, but nothing more advanced like what I'm talking about (if possible). If it is possible, sample code would be appreciated.
Thanks VERY much.