Answered by:
Is it possible to unzip zip files in HTML5/CSS/JS environment?

Question
-
Hello,
I would like to know if a Metro app created with HTML5/CSS/JS technology would able able to unzip a zip file.
Thanks in advance
Monday, October 22, 2012 8:21 AM
Answers
-
The WinRT compression API only works for a single data stream and not for multiple files or a folder. For that you need to write a WinRT component to use the .NET System.UI.Compression API, or you can use third-party libraries. See this thread: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/9f486365-56e8-4c46-9e26-78c565d0109a
Also see this blog post that mentions using the .NET APIs for this purpose:
- Marked as answer by P5music Monday, October 22, 2012 5:41 PM
Monday, October 22, 2012 4:56 PM
All replies
-
well the Compression namespace exists javascript runtime as well... so I would have to say "yes" :) here is a sample that might be of interest, there is the javascript version for download as well.
Can Bilgin
Blog CompuSightMonday, October 22, 2012 12:35 PM -
It seems so. Here's a sample
http://code.msdn.microsoft.com/windowsapps/Compression-sample-9d57900f#content
-Jeff
Monday, October 22, 2012 4:24 PM -
The WinRT compression API only works for a single data stream and not for multiple files or a folder. For that you need to write a WinRT component to use the .NET System.UI.Compression API, or you can use third-party libraries. See this thread: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/9f486365-56e8-4c46-9e26-78c565d0109a
Also see this blog post that mentions using the .NET APIs for this purpose:
- Marked as answer by P5music Monday, October 22, 2012 5:41 PM
Monday, October 22, 2012 4:56 PM -
We will publish an unzip WinRT component the coming weeks for x86/x64/ARM
See the current APIs spec in CoffeeScript here: https://gist.github.com/3934325
Maybe we will be tailoring the API to the whole IStorageFile/Folder schema and add zipping of files in the future.
Monday, October 22, 2012 9:09 PM -
Glad to hear it, Phil!Monday, October 22, 2012 9:28 PM
-
Did you ever get this into github? I've been trying to find it, with no luck.Thursday, February 21, 2013 12:34 PM
-
Actually yes, opened the ZIP-WinRT Component repository on Friday. Please see the accompanied specs on how to use the component.
Feel free to comment!
Tuesday, February 26, 2013 10:27 AM