cordova - Windows.Storage.Compression UnZip Compressed Folder -


i working on uwp app can use .net core libraries. have been trying implement zip/unzip tool. have few questions windows.storage.compression support standard gzip/zip file formats? have written test code extract zip created in windows return 0 byte length file.

var sourcefilename = "test.zip";       var sourcefile = await applicationdata.current.temporaryfolder.getfileasync(sourcefilename);        var decompressedfilename = "test.xlsx"; // sourcefile.name + ".decompressed";       var decompressedfile = await applicationdata.current.temporaryfolder.createfileasync(decompressedfilename, creationcollisionoption.generateuniquename);        //read file stream       using (var compressedinput = await sourcefile.opensequentialreadasync())       using (var decompressor = new decompressor(compressedinput))       using (var decompressedoutput = await decompressedfile.openasync(fileaccessmode.readwrite))       {         var bytesdecompressed = await randomaccessstream.copyasync(decompressor, decompressedoutput);            } 

as mentioned returns 0 length file.

further question want develop way extract existing zip (i have hundreds of them thousands of items) using system.windows.compression folder of files. (i have working fine in android , ios platforms cannot see how make simple task in uwp 10 (the system cannot use system.io.compression.zipfile - due cordova uwp windows 10 restrictions).

i have worked through https://github.com/microsoft/windows-universal-samples/tree/master/samples/compression/js - file sample came above again cannot open .zip made windows 10 or 7z.

further question want develop way extract existing zip (i have hundreds of them thousands of items) using system.windows.compression folder of files. (i have working fine in android , ios platforms cannot see how make simple task in uwp 10 (the system cannot use system.io.compression.zipfile - due cordova uwp windows 10 restrictions).

you can use cordova-plugin-zeep extract existing zip file. or can create own plugin leveraging system.io.compression.zipfile this zip/unzip logic. details, please refer creating windows plugin in c++ or managed code.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -