Search code examples
c#compact-frameworkcompression

Uncompress in .NET Compact Framework 1.0


I need a library I can use to uncompress a collection of files (something similar to unzipping). Any compression format will do. So far I have failed to find any zip libraries that meet my requirements. The library needs to meet the following requirements:

1) .NET Compact Framework 1.0 compatible.

2) I need access to the code (must be C#) so I can include it in my project. I can't use a dll file.

3) Preferably all managed code.


Solution

  • http://www.icsharpcode.net/opensource/sharpziplib/download.aspx

    Open source and works with .NET CF 1 and 2.

    EDIT:

    There are conditional compilation constants you can set to specify the Framework, e.g.:

    #elif (NETCF_1_0)
    [assembly: AssemblyTitle("SharpZipLib for .NET Compact Framework 1.0")]
    #elif (NETCF_2_0)
    [assembly: AssemblyTitle("SharpZipLib for .NET Compact Framework 2.0")]
    

    From checking the #ziplib source it seems that the only limitation for .NET CF 1.0 is that you cannot encrypt or decrypt files within a .zip archive (Cf 1.0 doesn't supply System.Security.Cryptography).