How to use System.IO.Packaging in MonoTouch

I got a problem while trying to use the System.IO.Packaging in MonoTouch. I cant found this ressource. Can anybody tell me where to find this ressource?


As far as I can see I'ts not available in MonoTouch.

If you need Zip Support, SharpZibLib works with MonoTouch.

If you use SharpZipLib watch out for this issue: Monotouch - ICSharpCode.SharpZipLib giving an error

System.IO.Packaging is part of WindowsBase.dll which is not shipped with MonoTouch (5.x).

However it's types, like ZipPackage are not fully compatible with normal zip files so this might not be ideal if you're looking to process .zip files. In this case you better use alternative libraries like the one mentioned by @Jamie.

If you really want some specific types System.IO.Packaging then you can try building the assembly from Mono source code (open source) which is available from gihub.

If you want to zip/unzip something you might also want to have a look at System.IO.Compression.GZIPStream() which is also available in MT. Use it like this:

string sContent;
string sDest = "zipped file with text";
using ( FileStream oIn = File.OpenRead( sDest ) )
using ( MemoryStream oOut = new MemoryStream() )
using ( GZipStream oZip = new GZipStream( oIn, CompressionMode.Decompress ) )
using ( StreamReader oReader = new StreamReader( oOut ) )
    oZip.CopyTo( oOut );
    oOut.Seek( 0, SeekOrigin.Begin );
    sContent = oReader.ReadToEnd();

Need Your Help

What do I need to know about Unicode?

unicode internationalization

Being a application developer, do I need to know Unicode?

Serial port configuration not working after forking

c++ linux configuration serial-port termios

I have written a program that can execute in foreground or background. The program uses a serial port to communicate. If I start it in foreground (i.e. it does not fork) everything runs fine. If I ...