C#.net identify zip file
问题 I am currently using the SharpZip api to handle my zip file entries. It works splendid for zipping and unzipping. Though, I am having trouble identifying if a file is a zip or not. I need to know if there is a way to detect if a file stream can be decompressed. Originally I used FileStream lFileStreamIn = File.OpenRead(mSourceFile); lZipFile = new ZipFile(lFileStreamIn); ZipInputStream lZipStreamTester = new ZipInputStream(lFileStreamIn, mBufferSize);// not working lZipStreamTester.Read