views:

60

answers:

2

I'm trying to create a Windows Phone 7 application, using either Silverlight or XNA, but I can't figure out how to do such thing, that would be part of the idea of the app. If it is not possible, is there any kind of format that does something similar to that?

Thanks in advance!

+3  A: 

You can read a zip file if you have prior knowledge of the folders and files it contains. In fact MSDN contains an example of doing that when discussing the Application.GetResourceStream(StreamResourceInfo, Uri) method.

Alternatively you can use slsharpzlib if you need to explore and extract (and indeed create) zip files.

AnthonyWJones
But does this work on windows phone?
Bruno
@Bruno: to which of the two approaches are you refering? If the latter, that would be a shame, it claims that it does. If it doesn't I don't know of any alternative.
AnthonyWJones
+1  A: 

SharpZipLib is implemented purely in C# and has been ported to the Compact Framework, so you could probably use it. Commercial libraries you have to be careful with becasue they may use P/Invokes to the zlib stuff for speed, which is going to fail under WinPhone.

EDIT

I see SharpZipLib has already been ported. See AnthonyWJones's answer.

ctacke