//------------------------------------// This is an extension for C#/XAML for HTML5 (www.cshtml5.com)//// It requires Beta 7.2 or newer.//// It adds the ability to create ZIP files and to read ZIP files.// It attempts to mimic the API of Ionic.Zip (DotNetZip) so as to// make it easier to migrate existing C# projects to CSHTML5.//// You can use it in conjunction with the FileSaver Extension// to save the ZIP files to the disk. You can also use it in// conjunction with the FileOpenDialog Extension to read a ZIP// file from the disk.//// The extension works by wrapping the JavaScript "JSZip.js"// library into a C#/XAML class for consumption by CSHTML5-based// apps. The "JSZip.js" library source code can be found at:// https://stuk.github.io/jszip///// This extension is licensed under the open-source MIT license:// https://opensource.org/licenses/MIT//// Copyright 2017 Userware / CSHTML5//------------------------------------

The extension works by wrapping the JavaScript "JSZip.js" library into a C#/XAML class for consumption by CSHTML5-based apps. The "JSZip.js" library source code can be found at: https://stuk.github.io/jszip/

You can test the code by calling the following C# code.

- To create a ZIP file that contains a text file (note: this sample code requires the FileSaver Extension as well):