Message 1 of 2
Unzip zip resources file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello all
i have an resources file called file.zip
to unzip it i must copy it to hard disk and i have no problem to copy outside it and unzip it directly using ZipFile class
but my question how can i zip it without copy it , i mean using memory stream
i begin from this line but i can't to complete my code to send the stream to ZipFile
string resource = "Installer.Resources.myFile.zip"; System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); Stream resFilestream = a.GetManifestResourceStream(resource); //ZipArchive archive = ZipFile.OpenRead(resFilestream);
OpenRead must give it an string path to can read the archive , but i need to use the stream variable to can unzip some contains not all in this archive.
i hope my question is clear š