![]() which is returned as a memory stream or a byte array. Compresses the supplied memory stream, naming it as zipEntryName, into a zip, NET one can use SharpZipLib, for Xamarin use SharpZipLib.Portable.Įxample for. String password = destinationFile = sourceFiles = (String.IsNullOrWhiteSpace(password))Ĭompressor.CompressFiles(destinationFile, sourceFiles) Ĭompressor.CompressFilesEncrypted(destinationFile, password, sourceFiles) įor. SevenZipCompressor compressor = new SevenZipCompressor() Ĭompressor.Compressing += Compressor_Compressing Ĭompressor.FileCompressionStarted += Compressor_FileCompressionStarted Ĭompressor.CompressionFinished += Compressor_CompressionFinished Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ? Environment.CurrentDirectory, ![]() SevenZipBase.SetLibraryPath(Path.Combine( ![]() It's basically a managed wrapper for 7-Zip. If you want to create password protected ZIP files in C#, I'd recommend SevenZipSharp. There is a way to make ZIP files, but without password. Unfortunately there is no such functionality in the framework.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |