├── uninstallGAC.bat
├── .nuget
└── nuget.exe
├── BuildNuget.bat
├── ICSharpCode.SharpZipLib.key
├── samples
├── DIME
│ ├── DimeDataSetService
│ │ ├── Global.asax
│ │ ├── Service1.asmx
│ │ ├── DimeDataSetService.suo
│ │ ├── DimeDataSetService.csproj.webinfo
│ │ ├── DimeDataSetService.vsdisco
│ │ ├── DimeDataSetService.sln
│ │ ├── Global.asax.cs
│ │ ├── Global.asax.resx
│ │ ├── Service1.asmx.resx
│ │ ├── Service1.asmx.cs
│ │ └── AssemblyInfo.cs
│ ├── DimeDataSetServiceConsumer
│ │ ├── App.ico
│ │ ├── DimeDataSetServiceConsumer.suo
│ │ ├── Web References
│ │ │ └── localhost
│ │ │ │ ├── Service1.disco
│ │ │ │ ├── Reference.map
│ │ │ │ └── Reference.cs
│ │ ├── DimeDataSetServiceConsumer.sln
│ │ ├── DimeDataSetServiceConsumer.csproj.user
│ │ └── AssemblyInfo.cs
│ └── readme.txt
├── vb
│ ├── minibzip2
│ │ ├── minibzip2.suo
│ │ ├── MainForm.resources
│ │ ├── minibzip2.vbproj.user
│ │ ├── minibzip2.cmbx
│ │ ├── minibzip2.sln
│ │ ├── AssemblyInfo.vb
│ │ ├── minibzip2.vbproj
│ │ └── minibzip2.prjx
│ ├── viewzipfile
│ │ ├── viewzipfile.suo
│ │ ├── MainForm.resources
│ │ ├── viewzipfile.vbproj.user
│ │ ├── viewzipfile.cmbx
│ │ ├── viewzipfile.sln
│ │ ├── AssemblyInfo.vb
│ │ ├── viewzipfile.vbproj
│ │ └── viewzipfile.prjx
│ ├── zipfiletest
│ │ ├── zipfiletest.suo
│ │ ├── zipfiletest.vbproj.user
│ │ ├── zipfiletest.cmbx
│ │ ├── zipfiletest.sln
│ │ ├── AssemblyInfo.vb
│ │ ├── zipfiletest.prjx
│ │ └── zipfiletest.vbproj
│ └── CreateZipFile
│ │ ├── MainForm.resources
│ │ ├── CreateZipFile.MainForm.resources
│ │ ├── CreateZipFile.cmbx
│ │ ├── CreateZipFile.sln
│ │ ├── AssemblyInfo.vb
│ │ ├── CreateZipFile.vbproj
│ │ └── CreateZipFile.prjx
├── HttpCompressionModule
│ ├── example
│ │ ├── blowery.gif
│ │ ├── Default.aspx
│ │ ├── ExistingImage.ashx
│ │ ├── DefaultController.cs
│ │ ├── Image.ashx
│ │ └── web.config
│ ├── httpcompressionmodule.pdf
│ ├── src
│ │ ├── ConfigSectionHandler.cs
│ │ ├── HttpCompressingFilter.cs
│ │ ├── GZipFilter.cs
│ │ └── DeflateFilter.cs
│ ├── license.txt
│ ├── HttpCompressionModule.sln
│ └── readme.txt
└── cs
│ ├── zipfiletest
│ ├── readme.txt
│ ├── zipfiletest.cmbx
│ ├── zipfiletest.sln
│ ├── zipfiletest.csproj
│ ├── zipfiletest.prjx
│ └── ZipFileTest.cs
│ ├── unzipfile
│ ├── readme.txt
│ ├── unzipfile.cmbx
│ ├── unzipfile.prjx
│ └── UnZipFile.cs
│ ├── viewzipfile
│ ├── readme.txt
│ ├── viewzipfile.cmbx
│ ├── ViewZipFile.cs
│ └── viewzipfile.prjx
│ ├── CreateZipFile
│ ├── readme.txt
│ ├── AssemblyInfo.cs
│ ├── CreateZipFile.cmbx
│ ├── CreateZipFile.sln
│ ├── CreateZipFile.csproj
│ └── CreateZipFile.prjx
│ ├── minibzip2
│ ├── readme.txt
│ ├── AssemblyInfo.cs
│ ├── minibzip2.cmbx
│ ├── minibzip2.sln
│ ├── minibzip2.csproj
│ └── minibzip2.prjx
│ ├── minigzip
│ ├── readme.txt
│ ├── AssemblyInfo.cs
│ ├── minigzip.cmbx
│ ├── minigzip.sln
│ ├── minigzip.csproj
│ └── minigzip.prjx
│ ├── sz
│ ├── sz.cmbx
│ ├── sz.sln
│ ├── AssemblyInfo.cs
│ ├── sz.csproj
│ └── sz.prjx
│ ├── zf
│ ├── zf.cmbx
│ ├── zf.sln
│ ├── zf.csproj
│ ├── zf.prjx
│ └── AssemblyInfo.cs
│ ├── tar
│ ├── tar.cmbx
│ ├── AssemblyInfo.cs
│ ├── Tar.csproj
│ └── tar.prjx
│ └── FastZip
│ ├── FastZip.cmbx
│ ├── AssemblyInfo.cs
│ ├── FastZip.sln
│ ├── FastZip.csproj
│ └── FastZip.prjx
├── tests
├── packages.config
├── SharpZipLibTests.cmbx
├── TestSupport
│ ├── Utils.cs
│ └── ZipTesting.cs
├── SharpZipLibTests.sln
├── AssemblyInfo.cs
├── Core
│ └── Core.cs
├── tests.build
└── Lzw
│ └── LzwTests.cs
├── installGAC.bat
├── sharpziplib.pc
├── .gitignore
├── ICSharpCode.SharpZLib.cmbx
├── src
├── VirtualFileSystem
│ ├── IDirectoryInfo.cs
│ ├── IFileInfo.cs
│ ├── VirtualFileSystem.cs
│ ├── [Enums].cs
│ ├── IVfsElement.cs
│ ├── VfsExtensions.cs
│ └── IVirtualFileSystem.cs
├── Main.cs
├── Core
│ ├── IScanFilter.cs
│ └── INameTransform.cs
├── Zip
│ └── Compression
│ │ └── DeflaterPending.cs
├── GZip
│ └── GZIPConstants.cs
├── Tar
│ └── TarException.cs
└── BZip2
│ └── BZip2Exception.cs
├── mkDistribution.bat
├── ICSharpCode.SharpZLib2008.sln
├── ICSharpCode.SharpZLib.sln
├── ICSharpCode.SharpZLib2005.sln
├── SharpZipLib.Portable.nuspec
├── ICSharpCode.SharpZLib.Portable.sln
├── SharpZipAll2005.sln
└── SharpZipLib.shfb
/uninstallGAC.bat:
--------------------------------------------------------------------------------
1 | gacutil /u ICSharpCode.SharpZipLib
2 |
--------------------------------------------------------------------------------
/.nuget/nuget.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/.nuget/nuget.exe
--------------------------------------------------------------------------------
/BuildNuget.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | del *.nupkg
3 | .\.nuget\nuget.exe pack .\SharpZipLib.Portable.nuspec -symbols
4 | PAUSE
5 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZipLib.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/ICSharpCode.SharpZipLib.key
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="DimeDataSetService.Global" %>
2 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/minibzip2/minibzip2.suo
--------------------------------------------------------------------------------
/samples/vb/minibzip2/MainForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/minibzip2/MainForm.resources
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/viewzipfile/viewzipfile.suo
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/zipfiletest/zipfiletest.suo
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Service1.asmx:
--------------------------------------------------------------------------------
1 | <%@ WebService Language="c#" Codebehind="Service1.asmx.cs" Class="DimeDataSetService.Service1" %>
2 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/MainForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/viewzipfile/MainForm.resources
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/MainForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/CreateZipFile/MainForm.resources
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/App.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/DIME/DimeDataSetServiceConsumer/App.ico
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/blowery.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/HttpCompressionModule/example/blowery.gif
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/readme.txt:
--------------------------------------------------------------------------------
1 | ziplist
2 | -------
3 |
4 | Usage:
5 |
6 |
7 | ziplist [filename]
8 |
9 | will view the headers of the zipfile [filename]
--------------------------------------------------------------------------------
/tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/DimeDataSetService.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/DIME/DimeDataSetService/DimeDataSetService.suo
--------------------------------------------------------------------------------
/samples/cs/unzipfile/readme.txt:
--------------------------------------------------------------------------------
1 | viewzipfile
2 | -----------
3 |
4 | Usage:
5 |
6 |
7 | unzipfile [filename]
8 |
9 | will unzip the contents of the zipfile [filename]
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/httpcompressionmodule.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/HttpCompressionModule/httpcompressionmodule.pdf
--------------------------------------------------------------------------------
/samples/cs/viewzipfile/readme.txt:
--------------------------------------------------------------------------------
1 | viewzipfile
2 | -----------
3 |
4 | Usage:
5 |
6 |
7 | viewzipfile [filename]
8 |
9 | will view the contents of the zipfile [filename]
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/CreateZipFile.MainForm.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/vb/CreateZipFile/CreateZipFile.MainForm.resources
--------------------------------------------------------------------------------
/installGAC.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | cd bin
3 | echo installing ICSharpCode.SharpZipLib.dll into the GAC
4 | gacutil /i ICSharpCode.SharpZipLib.dll
5 | cd ..
6 |
7 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/DimeDataSetServiceConsumer.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ygrenier/SharpZipLib.Portable/HEAD/samples/DIME/DimeDataSetServiceConsumer/DimeDataSetServiceConsumer.suo
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/DimeDataSetService.csproj.webinfo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sharpziplib.pc:
--------------------------------------------------------------------------------
1 | prefix=/usr
2 | exec_prefix=${prefix}
3 | libdir=${exec_prefix}/lib
4 |
5 | Name: sharpziplib
6 | Description: C# Zip, GZip, Tar and BZip2 library for .NET
7 | Version: 0.86
8 | Libs: -r:${libdir}/mono/sharpziplib/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/samples/DIME/readme.txt:
--------------------------------------------------------------------------------
1 | This sample demonstrates how to package a DataSet in a gzipped DIME attachment.
2 |
3 |
4 | Web Services Enhancements (WSE) 1.0 SP1 for Microsoft .NET
5 | http://microsoft.com/downloads/details.aspx?FamilyId=06255A94-2635-4D29-A90C-28B282993A41&displaylang=en
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/readme.txt:
--------------------------------------------------------------------------------
1 | createzipfile
2 | -------------
3 |
4 | Usage:
5 |
6 | createzipfile [directoryname] [zipfilename]
7 |
8 | will create zipfilename and store all files in the directory [directoryname]
9 | in it.
10 |
11 | (btw. [directoryname] is a directoryname like C:\testdir not *.* or other
12 | wildcards)
13 |
14 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/readme.txt:
--------------------------------------------------------------------------------
1 | minibzip2
2 | ---------
3 |
4 | Usage:
5 |
6 |
7 | minibzip2 [filename]
8 |
9 | Will create (or overwrite) a file [filename].bz2 with the bzipped
10 | contents of [filename]
11 |
12 | minibzip2 -d [filename].bz2
13 |
14 | Will create (or overwrite) a file [filename] with the bunzipped
15 | contents of [filename]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Ce fichier .gitignore a été créé automatiquement par Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | /bin
6 | /packages
7 | /src/obj/
8 | /tests/bin/
9 | /tests/obj/
10 | *.user
11 | *.suo
12 | *.nupkg
13 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/readme.txt:
--------------------------------------------------------------------------------
1 | minigzip
2 | --------
3 |
4 | Usage:
5 |
6 |
7 | minigzip [filename]
8 |
9 | Will create (or overwrite) a file [filename].gz with the gzipped
10 | contents of [filename]
11 |
12 | minigzip -d [filename].gz
13 |
14 | Will create (or overwrite) a file [filename] with the gunzipped
15 | contents of [filename]
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZLib.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/DimeDataSetService.vsdisco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/Default.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Inherits="Example.DefaultController"%>
2 |
4 |
5 |
6 | a test of compression
7 |
8 |
9 | Hi there pokey!
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/IDirectoryInfo.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 | ///
11 | /// Directory informations
12 | ///
13 | public interface IDirectoryInfo : IVfsElement
14 | {
15 | }
16 | }
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/IFileInfo.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 | ///
11 | /// File informations
12 | ///
13 | public interface IFileInfo : IVfsElement
14 | {
15 | ///
16 | /// Size of file
17 | ///
18 | long Length { get; }
19 | }
20 | }
21 | #endif
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/ExistingImage.ashx:
--------------------------------------------------------------------------------
1 | <%@ WebHandler Language="C#" Class="ExistingImage" %>
2 |
3 | using System.Web;
4 | using System.Drawing;
5 | using System.Drawing.Imaging;
6 | using System.IO;
7 |
8 | public class ExistingImage : IHttpHandler
9 | {
10 |
11 | public void ProcessRequest (HttpContext context)
12 | {
13 | context.Response.ContentType = "image/gif";
14 | context.Response.WriteFile("blowery.gif");
15 | }
16 |
17 |
18 | public bool IsReusable
19 | {
20 | get { return true; }
21 | }
22 | }
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.vbproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ProjectFiles
12 |
13 |
--------------------------------------------------------------------------------
/samples/cs/sz/sz.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/zf/zf.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.vbproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ProjectFiles
12 |
13 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.vbproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ProjectFiles
12 |
13 |
--------------------------------------------------------------------------------
/samples/cs/tar/tar.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | [assembly: AssemblyTitle("SharpDevelop")]
5 | [assembly: AssemblyDescription("free C# IDE")]
6 | [assembly: AssemblyConfiguration("")]
7 | [assembly: AssemblyCompany("")]
8 | [assembly: AssemblyProduct("SharpDevelop")]
9 | [assembly: AssemblyCopyright("Mike Krueger 2000")]
10 | [assembly: AssemblyTrademark("")]
11 | [assembly: AssemblyCulture("")]
12 |
13 | [assembly: AssemblyVersion("0.85.4.369")]
14 |
15 | [assembly: AssemblyDelaySign(false)]
16 | [assembly: AssemblyKeyFile("")]
17 | [assembly: AssemblyKeyName("")]
18 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | [assembly: AssemblyTitle("SharpDevelop")]
5 | [assembly: AssemblyDescription("free C# IDE")]
6 | [assembly: AssemblyConfiguration("")]
7 | [assembly: AssemblyCompany("")]
8 | [assembly: AssemblyProduct("SharpDevelop")]
9 | [assembly: AssemblyCopyright("Mike Krueger 2000")]
10 | [assembly: AssemblyTrademark("")]
11 | [assembly: AssemblyCulture("")]
12 |
13 | [assembly: AssemblyVersion("0.85.4.369")]
14 |
15 | [assembly: AssemblyDelaySign(false)]
16 | [assembly: AssemblyKeyFile("")]
17 | [assembly: AssemblyKeyName("")]
18 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/Web References/localhost/Service1.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | [assembly: AssemblyTitle("CreateZipFile")]
5 | [assembly: AssemblyDescription("Free C# IDE")]
6 | [assembly: AssemblyConfiguration("")]
7 | [assembly: AssemblyCompany("")]
8 | [assembly: AssemblyProduct("A SharpDevelop sample")]
9 | [assembly: AssemblyCopyright("Mike Krueger 2000")]
10 | [assembly: AssemblyTrademark("")]
11 | [assembly: AssemblyCulture("")]
12 |
13 | [assembly: AssemblyVersion("0.85.4.369")]
14 |
15 | [assembly: AssemblyDelaySign(false)]
16 | [assembly: AssemblyKeyFile("")]
17 | [assembly: AssemblyKeyName("")]
18 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/minigzip.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/minibzip2.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/unzipfile/unzipfile.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/viewzipfile/viewzipfile.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/zipfiletest.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/Web References/localhost/Reference.map:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/CreateZipFile.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/CreateZipFile.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/SharpZipLibTests.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/TestSupport/Utils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using NUnit.Framework;
4 |
5 | namespace SharpZipLibTests.TestSupport
6 | {
7 | ///
8 | /// Miscellaneous test utilities.
9 | ///
10 | public class Utils
11 | {
12 | public Utils()
13 | {
14 | }
15 |
16 | static void Compare(byte[] a, byte[] b)
17 | {
18 | if ( a == null ) {
19 | throw new ArgumentNullException("a");
20 | }
21 |
22 | if ( b == null ) {
23 | throw new ArgumentNullException("b");
24 | }
25 |
26 | Assert.AreEqual(a.Length, b.Length);
27 | for (int i = 0; i < a.Length; ++i) {
28 | Assert.AreEqual(a[i], b[i]);
29 | }
30 | }
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/src/ConfigSectionHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Xml;
3 | using System.Xml.Serialization;
4 | using System.Configuration;
5 |
6 | namespace blowery.Web.HttpModules
7 | {
8 | ///
9 | /// This class acts as a factory for the configuration settings.
10 | ///
11 | internal class HttpCompressionModuleSectionHandler : IConfigurationSectionHandler
12 | {
13 |
14 | ///
15 | /// Create a new config section handler. This is of type
16 | ///
17 | object IConfigurationSectionHandler.Create(object parent, object configContext, XmlNode configSection) {
18 | return new HttpCompressionModuleSettings(configSection);
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/samples/cs/sz/sz.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 9.00
2 | # SharpDevelop 2.0.0.1710
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sz", "sz.csproj", "{CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}"
4 | EndProject
5 | Global
6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 | Debug|Any CPU = Debug|Any CPU
8 | Release|Any CPU = Release|Any CPU
9 | EndGlobalSection
10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
11 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
12 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Release|Any CPU.Build.0 = Release|Any CPU
14 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | EndGlobalSection
16 | EndGlobal
17 |
--------------------------------------------------------------------------------
/samples/cs/zf/zf.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 9.00
2 | # SharpDevelop 2.0.0.1710
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zf", "zf.csproj", "{90E83588-261C-45A3-964F-4B707357D437}"
4 | EndProject
5 | Global
6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 | Debug|Any CPU = Debug|Any CPU
8 | Release|Any CPU = Release|Any CPU
9 | EndGlobalSection
10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
11 | {90E83588-261C-45A3-964F-4B707357D437}.Debug|Any CPU.Build.0 = Debug|Any CPU
12 | {90E83588-261C-45A3-964F-4B707357D437}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {90E83588-261C-45A3-964F-4B707357D437}.Release|Any CPU.Build.0 = Release|Any CPU
14 | {90E83588-261C-45A3-964F-4B707357D437}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | EndGlobalSection
16 | EndGlobal
17 |
--------------------------------------------------------------------------------
/tests/SharpZipLibTests.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 9.00
2 | # SharpDevelop 2.0.0.1710
3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests", "SharpZipLibTests.csproj", "{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}"
4 | EndProject
5 | Global
6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 | Debug|Any CPU = Debug|Any CPU
8 | Release|Any CPU = Release|Any CPU
9 | EndGlobalSection
10 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
11 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.Build.0 = Debug|Any CPU
12 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.Build.0 = Release|Any CPU
14 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | EndGlobalSection
16 | EndGlobal
17 |
--------------------------------------------------------------------------------
/samples/cs/FastZip/FastZip.cmbx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/minigzip.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "minigzip", "minigzip.csproj", "{301EF496-ED72-4448-A98E-A60D6BF6E0AE}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {301EF496-ED72-4448-A98E-A60D6BF6E0AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {301EF496-ED72-4448-A98E-A60D6BF6E0AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {301EF496-ED72-4448-A98E-A60D6BF6E0AE}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {301EF496-ED72-4448-A98E-A60D6BF6E0AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/minibzip2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "minibzip2", "minibzip2.csproj", "{7520CE0B-F1D4-4148-8427-BB03669D7672}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {7520CE0B-F1D4-4148-8427-BB03669D7672}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {7520CE0B-F1D4-4148-8427-BB03669D7672}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {7520CE0B-F1D4-4148-8427-BB03669D7672}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {7520CE0B-F1D4-4148-8427-BB03669D7672}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "minibzip2", "minibzip2.vbproj", "{E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/zipfiletest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZipFileTest", "zipfiletest.csproj", "{4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "viewzipfile", "viewzipfile.vbproj", "{DB53264C-64AD-4B43-91A9-F5325561C77B}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {DB53264C-64AD-4B43-91A9-F5325561C77B}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {DB53264C-64AD-4B43-91A9-F5325561C77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {DB53264C-64AD-4B43-91A9-F5325561C77B}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {DB53264C-64AD-4B43-91A9-F5325561C77B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "zipfiletest", "zipfiletest.vbproj", "{54057AFD-35E2-48C3-8419-45D57C351C1F}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {54057AFD-35E2-48C3-8419-45D57C351C1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {54057AFD-35E2-48C3-8419-45D57C351C1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {54057AFD-35E2-48C3-8419-45D57C351C1F}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {54057AFD-35E2-48C3-8419-45D57C351C1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/CreateZipFile.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.1.0.2498
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateZipFile", "CreateZipFile.csproj", "{DF63551E-BB6C-4A8D-9B01-DB94F721E74A}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {DF63551E-BB6C-4A8D-9B01-DB94F721E74A}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {DF63551E-BB6C-4A8D-9B01-DB94F721E74A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {DF63551E-BB6C-4A8D-9B01-DB94F721E74A}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {DF63551E-BB6C-4A8D-9B01-DB94F721E74A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/CreateZipFile.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CreateZipFile", "CreateZipFile.vbproj", "{1B2FD768-E530-45B7-B14F-AE5D07B24485}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | EndGlobalSection
18 | EndGlobal
19 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System.Reflection
2 | Imports System.Runtime.InteropServices
3 |
4 | ' General Information about an assembly is controlled through the following
5 | ' set of attributes. Change these attribute values to modify the information
6 | ' associated with an assembly.
7 |
8 | ' Review the values of the assembly attributes
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | ' Version information for an assembly consists of the following four values:
18 | '
19 | ' Major Version
20 | ' Minor Version
21 | ' Build Number
22 | ' Revision
23 | '
24 | ' You can specify all the values or you can default the Build and Revision Numbers
25 | ' by using the '*' as shown below:
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/DefaultController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Web.UI;
3 | using System.Web.UI.WebControls;
4 |
5 | namespace Example {
6 | ///
7 | /// This class acts as a controller for the default.aspx page.
8 | /// It handles Page events and maps events from
9 | /// the classes it contains to event handlers.
10 | ///
11 | public class DefaultController : Page {
12 |
13 | ///
14 | /// A label on the form
15 | ///
16 | protected Label MyLabel;
17 |
18 | ///
19 | /// Override of OnLoad that adds some processing.
20 | ///
21 | ///
22 | protected override void OnLoad(EventArgs e) {
23 | try {
24 | MyLabel.Text = "Right Now: " + DateTime.Now.ToString();
25 | }finally {
26 | base.OnLoad(e); // be sure to call base to fire the event
27 | }
28 | }
29 |
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/VirtualFileSystem.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using ICSharpCode.SharpZipLib.VirtualFileSystem;
8 |
9 | namespace ICSharpCode.SharpZipLib
10 | {
11 | ///
12 | /// Virtual File System singleton
13 | ///
14 | public static class VFS
15 | {
16 | private static IVirtualFileSystem _Current;
17 |
18 | ///
19 | /// Define the current VFS
20 | ///
21 | public static void SetCurrent(IVirtualFileSystem vfs)
22 | {
23 | _Current = vfs;
24 | }
25 |
26 | ///
27 | /// Current VFS
28 | ///
29 | public static IVirtualFileSystem Current
30 | {
31 | get { return _Current ?? (_Current = new DefaultFileSystem()); }
32 | }
33 |
34 | }
35 | }
36 | #endif
--------------------------------------------------------------------------------
/src/VirtualFileSystem/[Enums].cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 |
11 | ///
12 | /// File attributes
13 | ///
14 | [Flags]
15 | public enum FileAttributes : int
16 | {
17 | ///
18 | /// File is read only
19 | ///
20 | ReadOnly = 1,
21 | ///
22 | /// File is hidden
23 | ///
24 | Hidden = 2,
25 | ///
26 | /// File is directory
27 | ///
28 | Directory = 16,
29 | ///
30 | /// File is for archive
31 | ///
32 | Archive = 32,
33 | ///
34 | /// File is normal
35 | ///
36 | Normal = 128
37 | }
38 |
39 | }
40 | #endif
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2002 Ben Lowery (blowery@monkey.org)
2 |
3 | This software is provided 'as-is', without any express or implied
4 | warranty. In no event will the authors be held liable for any damages
5 | arising from the use of this software.
6 |
7 | Permission is granted to anyone to use this software for any purpose,
8 | including commercial applications, and to alter it and redistribute it
9 | freely, subject to the following restrictions:
10 |
11 | 1. The origin of this software must not be misrepresented; you must not
12 | claim that you wrote the original software. If you use this software
13 | in a product, an acknowledgment in the product documentation would be
14 | appreciated but is not required.
15 | 2. Altered source versions must be plainly marked as such, and must not be
16 | misrepresented as being the original software.
17 | 3. This notice may not be removed or altered from any source distribution.
18 |
19 | Ben Lowery
20 | blowery@monkey.org
21 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/DimeDataSetServiceConsumer.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 7.00
2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DimeDataSetServiceConsumer", "DimeDataSetServiceConsumer.csproj", "{93803BD4-545B-499E-A44B-E6516B9C1D72}"
3 | EndProject
4 | Global
5 | GlobalSection(SolutionConfiguration) = preSolution
6 | ConfigName.0 = Debug
7 | ConfigName.1 = Release
8 | EndGlobalSection
9 | GlobalSection(ProjectDependencies) = postSolution
10 | EndGlobalSection
11 | GlobalSection(ProjectConfiguration) = postSolution
12 | {93803BD4-545B-499E-A44B-E6516B9C1D72}.Debug.ActiveCfg = Debug|.NET
13 | {93803BD4-545B-499E-A44B-E6516B9C1D72}.Debug.Build.0 = Debug|.NET
14 | {93803BD4-545B-499E-A44B-E6516B9C1D72}.Release.ActiveCfg = Release|.NET
15 | {93803BD4-545B-499E-A44B-E6516B9C1D72}.Release.Build.0 = Release|.NET
16 | EndGlobalSection
17 | GlobalSection(ExtensibilityGlobals) = postSolution
18 | EndGlobalSection
19 | GlobalSection(ExtensibilityAddIns) = postSolution
20 | EndGlobalSection
21 | EndGlobal
22 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/DimeDataSetService.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 7.00
2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DimeDataSetService", "http://localhost/DimeDataSetService/DimeDataSetService.csproj", "{1038C60D-927F-40A9-A263-3AD1B26E9173}"
3 | EndProject
4 | Global
5 | GlobalSection(SolutionConfiguration) = preSolution
6 | ConfigName.0 = Debug
7 | ConfigName.1 = Release
8 | EndGlobalSection
9 | GlobalSection(ProjectDependencies) = postSolution
10 | EndGlobalSection
11 | GlobalSection(ProjectConfiguration) = postSolution
12 | {1038C60D-927F-40A9-A263-3AD1B26E9173}.Debug.ActiveCfg = Debug|.NET
13 | {1038C60D-927F-40A9-A263-3AD1B26E9173}.Debug.Build.0 = Debug|.NET
14 | {1038C60D-927F-40A9-A263-3AD1B26E9173}.Release.ActiveCfg = Release|.NET
15 | {1038C60D-927F-40A9-A263-3AD1B26E9173}.Release.Build.0 = Release|.NET
16 | EndGlobalSection
17 | GlobalSection(ExtensibilityGlobals) = postSolution
18 | EndGlobalSection
19 | GlobalSection(ExtensibilityAddIns) = postSolution
20 | EndGlobalSection
21 | EndGlobal
22 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System.Reflection
2 | Imports System.Runtime.InteropServices
3 |
4 | ' General Information about an assembly is controlled through the following
5 | ' set of attributes. Change these attribute values to modify the information
6 | ' associated with an assembly.
7 |
8 | ' Review the values of the assembly attributes
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 'The following GUID is for the ID of the typelib if this project is exposed to COM
18 |
19 |
20 | ' Version information for an assembly consists of the following four values:
21 | '
22 | ' Major Version
23 | ' Minor Version
24 | ' Build Number
25 | ' Revision
26 | '
27 | ' You can specify all the values or you can default the Build and Revision Numbers
28 | ' by using the '*' as shown below:
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/IVfsElement.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 | ///
11 | /// VFS Element informations
12 | ///
13 | public interface IVfsElement
14 | {
15 | ///
16 | /// Name
17 | ///
18 | string Name { get; }
19 | ///
20 | /// Element exists
21 | ///
22 | bool Exists { get; }
23 | ///
24 | /// Attributes
25 | ///
26 | FileAttributes Attributes { get; }
27 | ///
28 | /// Creation time
29 | ///
30 | DateTime CreationTime { get; }
31 | ///
32 | /// Last access time
33 | ///
34 | DateTime LastAccessTime { get; }
35 | ///
36 | /// Last write time
37 | ///
38 | DateTime LastWriteTime { get; }
39 | }
40 | }
41 | #endif
42 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System.Reflection
2 | Imports System.Runtime.InteropServices
3 |
4 | ' General Information about an assembly is controlled through the following
5 | ' set of attributes. Change these attribute values to modify the information
6 | ' associated with an assembly.
7 |
8 | ' Review the values of the assembly attributes
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 'The following GUID is for the ID of the typelib if this project is exposed to COM
18 |
19 |
20 | ' Version information for an assembly consists of the following four values:
21 | '
22 | ' Major Version
23 | ' Minor Version
24 | ' Build Number
25 | ' Revision
26 | '
27 | ' You can specify all the values or you can default the Build and Revision Numbers
28 | ' by using the '*' as shown below:
29 |
30 |
31 |
--------------------------------------------------------------------------------
/mkDistribution.bat:
--------------------------------------------------------------------------------
1 | @echo "mkDistribution v1.4"
2 |
3 | if exist current (
4 | rmdir /s /q current
5 | )
6 |
7 | mkdir current
8 |
9 | REM mkdir current\netcf-10
10 | REM nant -t:netcf-1.0 -D:build.output.dir=current\netcf-10 -buildfile:sharpZLib.build build
11 |
12 | mkdir current\netcf-20
13 | nant -t:netcf-2.0 -D:build.output.dir=current\netcf-20 -buildfile:sharpZLib.build build
14 |
15 | mkdir current\net-11
16 | nant -t:net-1.1 -D:build.output.dir=current\net-11 -buildfile:sharpZLib.build build
17 |
18 | mkdir current\net-20
19 | nant -t:net-2.0 -D:build.output.dir=current\net-20 -buildfile:sharpZLib.build build
20 |
21 | @rem Version 1.8 of Sandcastle Help File Builder no longer includes the Console.exe, use the GUI instead
22 | "c:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilderConsole.exe" .\SharpZipLib.shfb
23 |
24 | mkdir current\doc
25 | copy doc\readme.rtf current\doc
26 | copy doc\Changes.txt current\doc
27 | copy doc\Copying.txt current\doc
28 | copy SharpZipLib.chm current\doc
29 | copy installGAC.bat current
30 | copy uninstallGAC.bat current
31 |
32 | samples\cs\bin\sz -rc current\SharpZipLib.zip current\*.dll
33 |
34 | @echo TODO Compress source to SharpZipLib_SourceSamples.zip
35 | @echo TODO Build Bin Zip files
36 |
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System.Reflection
2 | Imports System.Runtime.CompilerServices
3 |
4 | ' Information about this assembly is defined by the following
5 | ' attributes.
6 | '
7 | ' change them to the information which is associated with the assembly
8 | ' you compile.
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | ' The assembly version has following format :
20 | '
21 | ' Major.Minor.Build.Revision
22 | '
23 | ' You can specify all values by your own or you can build default build and revision
24 | ' numbers with the '*' character (the default):
25 |
26 |
27 |
28 | ' The following attributes specify the key for the sign of your assembly. See the
29 | ' .NET Framework documentation for more information about signing.
30 | ' This is not required, if you don't want signing let these attributes like they're.
31 |
32 |
33 |
--------------------------------------------------------------------------------
/samples/cs/FastZip/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("FastZip sample")]
11 | [assembly: AssemblyDescription("A SharpZip library sample.")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("Copyright 2005 John Reilly")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("0.85.4.369")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/Image.ashx:
--------------------------------------------------------------------------------
1 | <%@ WebHandler Language="C#" Class="ImageMaker" %>
2 |
3 | using System.Web;
4 | using System.Drawing;
5 | using System.Drawing.Imaging;
6 | using System.IO;
7 |
8 | public class ImageMaker : IHttpHandler
9 | {
10 | public void ProcessRequest (HttpContext context)
11 | {
12 | using(Bitmap myFoo = new Bitmap(200,200,PixelFormat.Format24bppRgb)) {
13 | using(Graphics g = Graphics.FromImage(myFoo)) {
14 |
15 | g.FillRectangle(Brushes.Gray,0,0,200,200);
16 | g.FillPie(Brushes.Yellow,100,100,100,100,0,90);
17 |
18 | }
19 | context.Response.ContentType = "image/png";
20 |
21 | // have to do this crap because saving
22 | // png directly to HttpResponse.OutputStream
23 | // is broken in the 1.0 bits (at least up to sp2)
24 | // should just be
25 | // myFoo.Save(context.Response.OutputStream, ImageFormat.Png);
26 | MemoryStream ms = new MemoryStream();
27 | myFoo.Save(ms, ImageFormat.Png);
28 | context.Response.OutputStream.Write(ms.ToArray(), 0, (int)ms.Length);
29 | }
30 | }
31 |
32 | public bool IsReusable
33 | {
34 | get { return true; }
35 | }
36 | }
--------------------------------------------------------------------------------
/samples/cs/sz/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("SZ Sharp Sample")]
11 | [assembly: AssemblyDescription("A free C# compression library")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("#ZipLibrary")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("Copyright 2004 John Reilly")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("0.85.4.369")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/samples/cs/tar/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("Tar Sharp Sample")]
11 | [assembly: AssemblyDescription("A simple tar application")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("#ZipLibrary")]
15 | [assembly: AssemblyCopyright("Copyright 2003 ICSharpCode.NET")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("0.85.4.369")]
27 |
28 | // The following attributes specify the key for the sign of your assembly. See the
29 | // .NET Framework documentation for more information about signing.
30 | // This is not required, if you don't want signing let these attributes like they're.
31 | [assembly: AssemblyDelaySign(false)]
32 | [assembly: AssemblyKeyFile("")]
33 |
--------------------------------------------------------------------------------
/tests/TestSupport/ZipTesting.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Text;
5 |
6 | using ICSharpCode.SharpZipLib.Zip;
7 |
8 | namespace ICSharpCode.SharpZipLib.Tests.TestSupport
9 | {
10 | ///
11 | /// Provides support for testing in memory zip archives.
12 | ///
13 | static class ZipTesting
14 | {
15 | ///
16 | /// Tests the archive.
17 | ///
18 | /// The data.
19 | ///
20 | public static bool TestArchive(byte[] data)
21 | {
22 | return TestArchive(data, null);
23 | }
24 |
25 | ///
26 | /// Tests the archive.
27 | ///
28 | /// The data.
29 | /// The password.
30 | /// true if archive tests ok; false otherwise.
31 | public static bool TestArchive(byte[] data, string password)
32 | {
33 | using (MemoryStream ms = new MemoryStream(data))
34 | using (ZipFile zipFile = new ZipFile(ms)) {
35 | #if !PCL
36 | zipFile.Password = password;
37 | #else
38 | if (!String.IsNullOrWhiteSpace(password))
39 | throw new InvalidOperationException("Password not supported in PCL");
40 | #endif
41 | return zipFile.TestArchive(true);
42 | }
43 | }
44 |
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/tests/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following
5 | // attributes.
6 | //
7 | // change them to the information which is associated with the assembly
8 | // you compile.
9 |
10 | [assembly: AssemblyTitle("SharpZipTests")]
11 | [assembly: AssemblyDescription("Nunit test suite for #Zip library")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("ICSharpCode.net")]
14 | [assembly: AssemblyProduct("#ZipLibrary")]
15 | [assembly: AssemblyCopyright("Copyright 2001-2007 Mike Krueger, John Reilly")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // The assembly version has following format :
20 | //
21 | // Major.Minor.Build.Revision
22 | //
23 | // You can specify all values by your own or you can build default build and revision
24 | // numbers with the '*' character (the default):
25 |
26 | [assembly: AssemblyVersion("0.85.5.407")]
27 | [assembly: AssemblyInformationalVersionAttribute("0.85.5")]
28 |
29 | // The following attributes specify the key for the sign of your assembly. See the
30 | // .NET Framework documentation for more information about signing.
31 | // This is not required, if you don't want signing let these attributes like they're.
32 | [assembly: AssemblyDelaySign(false)]
33 | [assembly: AssemblyKeyFile("")]
34 |
--------------------------------------------------------------------------------
/samples/cs/FastZip/FastZip.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.0.2595
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastZip", "FastZip.csproj", "{61BE8DBC-149A-4564-B891-9EEA4A09ED12}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZipLib", "..\..\..\src\ICSharpCode.SharpZLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
8 | EndProject
9 | Global
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {61BE8DBC-149A-4564-B891-9EEA4A09ED12}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {61BE8DBC-149A-4564-B891-9EEA4A09ED12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {61BE8DBC-149A-4564-B891-9EEA4A09ED12}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {61BE8DBC-149A-4564-B891-9EEA4A09ED12}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | EndGlobalSection
24 | EndGlobal
25 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/HttpCompressionModule.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 7.00
2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpCompressionModule", "src\HttpCompressionModule.csproj", "{24B5F8DA-F11C-4B77-8BF9-5D2E4534DDE5}"
3 | EndProject
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "example\Example.csproj", "{621AAC3C-38EC-4F70-80D3-68DE4829AA33}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfiguration) = preSolution
8 | ConfigName.0 = Debug
9 | ConfigName.1 = Release
10 | EndGlobalSection
11 | GlobalSection(ProjectDependencies) = postSolution
12 | EndGlobalSection
13 | GlobalSection(ProjectConfiguration) = postSolution
14 | {24B5F8DA-F11C-4B77-8BF9-5D2E4534DDE5}.Debug.ActiveCfg = Debug|.NET
15 | {24B5F8DA-F11C-4B77-8BF9-5D2E4534DDE5}.Debug.Build.0 = Debug|.NET
16 | {24B5F8DA-F11C-4B77-8BF9-5D2E4534DDE5}.Release.ActiveCfg = Release|.NET
17 | {24B5F8DA-F11C-4B77-8BF9-5D2E4534DDE5}.Release.Build.0 = Release|.NET
18 | {621AAC3C-38EC-4F70-80D3-68DE4829AA33}.Debug.ActiveCfg = Debug|.NET
19 | {621AAC3C-38EC-4F70-80D3-68DE4829AA33}.Debug.Build.0 = Debug|.NET
20 | {621AAC3C-38EC-4F70-80D3-68DE4829AA33}.Release.ActiveCfg = Release|.NET
21 | {621AAC3C-38EC-4F70-80D3-68DE4829AA33}.Release.Build.0 = Release|.NET
22 | EndGlobalSection
23 | GlobalSection(ExtensibilityGlobals) = postSolution
24 | EndGlobalSection
25 | GlobalSection(ExtensibilityAddIns) = postSolution
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZLib2008.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 10.00
3 | # Visual Studio 2008
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests", "tests\SharpZipLibTests.csproj", "{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZLib", "src\ICSharpCode.SharpZLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZLib.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.1.2660
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests", "tests\SharpZipLibTests.csproj", "{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZLib", "src\ICSharpCode.SharpZLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
8 | EndProject
9 | Global
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.Build.0 = Debug|Any CPU
17 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(SolutionProperties) = preSolution
25 | HideSolutionNode = FALSE
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZLib2005.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | # SharpDevelop 2.2.1.2660
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests", "tests\SharpZipLibTests.csproj", "{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZLib", "src\ICSharpCode.SharpZLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
8 | EndProject
9 | Global
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.Build.0 = Debug|Any CPU
17 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.ActiveCfg = Release|Any CPU
18 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.Build.0 = Release|Any CPU
19 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(SolutionProperties) = preSolution
25 | HideSolutionNode = FALSE
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using System.Web;
5 | using System.Web.SessionState;
6 |
7 | namespace DimeDataSetService
8 | {
9 | ///
10 | /// Summary description for Global.
11 | ///
12 | public class Global : System.Web.HttpApplication
13 | {
14 | public Global()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 | protected void Application_Start(Object sender, EventArgs e)
20 | {
21 |
22 | }
23 |
24 | protected void Session_Start(Object sender, EventArgs e)
25 | {
26 |
27 | }
28 |
29 | protected void Application_BeginRequest(Object sender, EventArgs e)
30 | {
31 |
32 | }
33 |
34 | protected void Application_EndRequest(Object sender, EventArgs e)
35 | {
36 |
37 | }
38 |
39 | protected void Application_AuthenticateRequest(Object sender, EventArgs e)
40 | {
41 |
42 | }
43 |
44 | protected void Application_Error(Object sender, EventArgs e)
45 | {
46 |
47 | }
48 |
49 | protected void Session_End(Object sender, EventArgs e)
50 | {
51 |
52 | }
53 |
54 | protected void Application_End(Object sender, EventArgs e)
55 | {
56 |
57 | }
58 |
59 | #region Web Form Designer generated code
60 | ///
61 | /// Required method for Designer support - do not modify
62 | /// the contents of this method with the code editor.
63 | ///
64 | private void InitializeComponent()
65 | {
66 | }
67 | #endregion
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/SharpZipLib.Portable.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SharpZipLib.Portable
5 | 0.86.0.0003
6 | ygrenier
7 | ygrenier
8 | http://icsharpcode.github.io/SharpZipLib/#license
9 | https://github.com/ygrenier/SharpZipLib.Portable
10 | false
11 | SharpZipLib for Portable Class Library (.Net 4.5, WP 8.0, WP 8.1, WinStore 8.1, MonoDroid, MonoTouch (Classic), Xamarin.iOS)
12 |
13 | * V:0.86.0.0003
14 | - Nuget package supports Xamarin.iOS plateform.
15 |
16 | * V:0.86.0.0002
17 | - Merge some updates from the original library.
18 |
19 | * V:0.86.0.0001
20 | - Implements a VirtualFileSystem structure to simulate file access.
21 |
22 | * V:0.86.0
23 | - Initial release.
24 |
25 | Copyright 2001-2014 Mike Krueger, John Reilly, Yan Grenier
26 | SharpZipLib zip PCL Portable
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/VfsExtensions.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 | ///
11 | /// Extensions for VFS
12 | ///
13 | public static class VfsExtensions
14 | {
15 | ///
16 | /// Check if a directory exists
17 | ///
18 | public static bool DirectoryExists(this IVirtualFileSystem vfs, String directoryName)
19 | {
20 | try
21 | {
22 | return vfs.GetDirectoryInfo(directoryName).Exists;
23 | }
24 | catch
25 | {
26 | return false;
27 | }
28 | }
29 | ///
30 | /// Check if a file exists
31 | ///
32 | public static bool FileExists(this IVirtualFileSystem vfs, String fileName)
33 | {
34 | try
35 | {
36 | return vfs.GetFileInfo(fileName).Exists;
37 | }
38 | catch
39 | {
40 | return false;
41 | }
42 | }
43 | ///
44 | /// List directorires and files
45 | ///
46 | public static IEnumerable GetDirectoriesAndFiles(this IVirtualFileSystem vfs, String directoryName)
47 | {
48 | return vfs.GetDirectories(directoryName).Concat(vfs.GetFiles(directoryName));
49 | }
50 | }
51 | }
52 | #endif
53 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/example/web.config:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/tests/Core/Core.cs:
--------------------------------------------------------------------------------
1 | using NUnit.Framework;
2 |
3 | using ICSharpCode.SharpZipLib.Core;
4 |
5 | namespace ICSharpCode.SharpZipLib.Tests.Core
6 | {
7 | [TestFixture]
8 | public class Core
9 | {
10 |
11 | [Test]
12 | public void FilterQuoting()
13 | {
14 | string[] filters = NameFilter.SplitQuoted("");
15 | Assert.AreEqual(0, filters.Length);
16 |
17 | filters = NameFilter.SplitQuoted(";;;");
18 | Assert.AreEqual(4, filters.Length);
19 | foreach(string filter in filters) {
20 | Assert.AreEqual("", filter);
21 | }
22 |
23 | filters = NameFilter.SplitQuoted("a;a;a;a;a");
24 | Assert.AreEqual(5, filters.Length);
25 | foreach (string filter in filters) {
26 | Assert.AreEqual("a", filter);
27 | }
28 |
29 | filters = NameFilter.SplitQuoted(@"a\;;a\;;a\;;a\;;a\;");
30 | Assert.AreEqual(5, filters.Length);
31 | foreach (string filter in filters) {
32 | Assert.AreEqual("a;", filter);
33 | }
34 | }
35 |
36 | [Test]
37 | public void NullFilter()
38 | {
39 | NameFilter nf = new NameFilter(null);
40 | Assert.IsTrue(nf.IsIncluded("o78i6bgv5rvu\\kj//&*"));
41 | }
42 |
43 | [Test]
44 | public void ValidFilter()
45 | {
46 | Assert.IsTrue(NameFilter.IsValidFilterExpression(null));
47 | Assert.IsTrue(NameFilter.IsValidFilterExpression(string.Empty));
48 | Assert.IsTrue(NameFilter.IsValidFilterExpression("a"));
49 |
50 | Assert.IsFalse(NameFilter.IsValidFilterExpression(@"\,)"));
51 | Assert.IsFalse(NameFilter.IsValidFilterExpression(@"[]"));
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/src/HttpCompressingFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace blowery.Web.HttpModules {
5 | ///
6 | /// Base for any HttpFilter that performing compression
7 | ///
8 | ///
9 | /// When implementing this class, you need to implement a
10 | /// along with a NameOfContentEncoding property. The latter corresponds to a
11 | /// content coding (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5)
12 | /// that your implementation will support.
13 | ///
14 | public abstract class HttpCompressingFilter : HttpOutputFilter {
15 |
16 | ///
17 | /// Protected constructor that sets up the underlying stream we're compressing into
18 | ///
19 | /// The stream we're wrapping up
20 | /// The level of compression to use when compressing the content
21 | protected HttpCompressingFilter(Stream baseStream, CompressionLevels compressionLevel) : base(baseStream) {
22 | _compressionLevel = compressionLevel;
23 | }
24 |
25 | ///
26 | /// The name of the content-encoding that's being implemented
27 | ///
28 | ///
29 | /// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5 for more
30 | /// details on content codings.
31 | ///
32 | public abstract string NameOfContentEncoding { get; }
33 |
34 | private CompressionLevels _compressionLevel;
35 |
36 | ///
37 | /// Allow inheriting classes to get access the the level of compression that should be used
38 | ///
39 | protected CompressionLevels CompressionLevel {
40 | get { return _compressionLevel; }
41 | }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Main.cs:
--------------------------------------------------------------------------------
1 | // Main.cs
2 | //
3 | // Copyright (C) 2001 Mike Krueger
4 | //
5 | // This program is free software; you can redistribute it and/or
6 | // modify it under the terms of the GNU General Public License
7 | // as published by the Free Software Foundation; either version 2
8 | // of the License, or (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program; if not, write to the Free Software
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | //
19 | // Linking this library statically or dynamically with other modules is
20 | // making a combined work based on this library. Thus, the terms and
21 | // conditions of the GNU General Public License cover the whole
22 | // combination.
23 | //
24 | // As a special exception, the copyright holders of this library give you
25 | // permission to link this library with independent modules to produce an
26 | // executable, regardless of the license terms of these independent
27 | // modules, and to copy and distribute the resulting executable under
28 | // terms of your choice, provided that you also meet, for each linked
29 | // independent module, the terms and conditions of the license of that
30 | // module. An independent module is a module which is not derived from
31 | // or based on this library. If you modify this library, you may extend
32 | // this exception to your version of the library, but you are not
33 | // obligated to do so. If you do not wish to do so, delete this
34 | // exception statement from your version.
35 | //
36 |
37 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Global.asax.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Service1.asmx.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/tests/tests.build:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/DimeDataSetServiceConsumer.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
21 |
37 |
38 |
39 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ICSharpCode.SharpZLib.Portable.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 2013
3 | VisualStudioVersion = 12.0.30723.0
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZib.Portable", "src\ICSharpCode.SharpZib.Portable.csproj", "{74FF9E31-751B-4AA3-B441-175E3C17E037}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests2013.Portable", "tests\SharpZipLibTests2013.Portable.csproj", "{C5356646-EB46-452A-908A-271BCCB1BC04}"
8 | EndProject
9 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github", "Github", "{2F09DDF6-B8C4-4B7F-8F6C-3DE5DBD46AEC}"
10 | ProjectSection(SolutionItems) = preProject
11 | README.md = README.md
12 | EndProjectSection
13 | EndProject
14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget", "Nuget", "{C772A6C0-E81D-4B61-99AE-403F219E2476}"
15 | ProjectSection(SolutionItems) = preProject
16 | SharpZipLib.Portable.nuspec = SharpZipLib.Portable.nuspec
17 | EndProjectSection
18 | EndProject
19 | Global
20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 | Debug|Any CPU = Debug|Any CPU
22 | Release|Any CPU = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
25 | {74FF9E31-751B-4AA3-B441-175E3C17E037}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {74FF9E31-751B-4AA3-B441-175E3C17E037}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {74FF9E31-751B-4AA3-B441-175E3C17E037}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {74FF9E31-751B-4AA3-B441-175E3C17E037}.Release|Any CPU.Build.0 = Release|Any CPU
29 | {C5356646-EB46-452A-908A-271BCCB1BC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30 | {C5356646-EB46-452A-908A-271BCCB1BC04}.Debug|Any CPU.Build.0 = Debug|Any CPU
31 | {C5356646-EB46-452A-908A-271BCCB1BC04}.Release|Any CPU.ActiveCfg = Release|Any CPU
32 | {C5356646-EB46-452A-908A-271BCCB1BC04}.Release|Any CPU.Build.0 = Release|Any CPU
33 | EndGlobalSection
34 | GlobalSection(SolutionProperties) = preSolution
35 | HideSolutionNode = FALSE
36 | EndGlobalSection
37 | EndGlobal
38 |
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/zipfiletest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02}
7 | NewProject
8 | ziplist
9 | Exe
10 |
11 | 4
12 |
13 |
14 | False
15 | False
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | True
23 | False
24 | True
25 |
26 | bin\
27 | False
28 |
29 |
30 | True
31 | True
32 | False
33 | True
34 |
35 | \
36 | False
37 |
38 |
39 |
40 |
41 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/minigzip.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {301EF496-ED72-4448-A98E-A60D6BF6E0AE}
7 | NewProject
8 | minigzip
9 | Exe
10 |
11 | 4
12 |
13 |
14 | False
15 | False
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | True
23 | False
24 | True
25 |
26 | bin\
27 | True
28 |
29 |
30 | True
31 | True
32 | False
33 | True
34 |
35 | \
36 | True
37 |
38 |
39 |
40 |
41 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/samples/cs/FastZip/FastZip.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Release
4 | AnyCPU
5 | 2.0
6 | {61BE8DBC-149A-4564-B891-9EEA4A09ED12}
7 | FastZip
8 | FastZip
9 | Exe
10 |
11 | 4
12 |
13 |
14 | False
15 | False
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | False
23 | False
24 | True
25 |
26 | bin\Debug\
27 | False
28 |
29 |
30 | False
31 | True
32 | False
33 | False
34 |
35 | bin\Release\
36 | False
37 |
38 |
39 |
40 |
41 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/src/GZipFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | using System.Text;
5 | using System.Diagnostics;
6 |
7 | using ICSharpCode.SharpZipLib.Zip.Compression;
8 | using ICSharpCode.SharpZipLib.GZip;
9 | using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
10 |
11 | namespace blowery.Web.HttpModules {
12 | ///
13 | /// This is a little filter to support HTTP compression using GZip
14 | ///
15 | public class GZipFilter : HttpCompressingFilter {
16 |
17 | ///
18 | /// compression stream member
19 | /// has to be a member as we can only have one instance of the
20 | /// actual filter class
21 | ///
22 | private GZipOutputStream m_stream = null;
23 |
24 | ///
25 | /// Primary constructor. Need to pass in a stream to wrap up with gzip.
26 | ///
27 | /// The stream to wrap in gzip. Must have CanWrite.
28 | public GZipFilter(Stream baseStream) : base(baseStream, CompressionLevels.Normal) { }
29 |
30 | ///
31 | /// Write content to the stream and have it compressed using gzip.
32 | ///
33 | /// The bytes to write
34 | /// The offset into the buffer to start reading bytes
35 | /// The number of bytes to write
36 | public override void Write(byte[] buffer, int offset, int count) {
37 | // GZipOutputStream stream = new GZipOutputStream(BaseStream);
38 | // stream.Write(buffer, offset, count);
39 | // stream.Finish();
40 | if (m_stream == null)
41 | m_stream = new GZipOutputStream(BaseStream);
42 | m_stream.Write(buffer, offset, count);
43 | }
44 |
45 | ///
46 | /// The Http name of this encoding. Here, gzip.
47 | ///
48 | public override string NameOfContentEncoding {
49 | get { return "gzip"; }
50 | }
51 |
52 | ///
53 | /// Closes this Filter and calls the base class implementation.
54 | ///
55 | public override void Close() {
56 | if (m_stream != null)
57 | m_stream.Finish();
58 | base.Close();
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/samples/cs/viewzipfile/ViewZipFile.cs:
--------------------------------------------------------------------------------
1 | // project created on 10.11.2001 at 13:09
2 | using System;
3 | using System.Text;
4 | using System.Collections;
5 | using System.IO;
6 | using System.Diagnostics;
7 | using System.Runtime.Serialization.Formatters.Binary;
8 |
9 | using ICSharpCode.SharpZipLib.BZip2;
10 | using ICSharpCode.SharpZipLib.Zip;
11 | using ICSharpCode.SharpZipLib.Zip.Compression;
12 | using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
13 | using ICSharpCode.SharpZipLib.GZip;
14 |
15 |
16 | class MainClass
17 | {
18 | public static void Main(string[] args)
19 | {
20 | // Perform simple parameter checking.
21 | if ( args.Length < 1 ) {
22 | Console.WriteLine("Usage ViewZipFile NameOfFile");
23 | return;
24 | }
25 |
26 | if ( !File.Exists(args[0]) ) {
27 | Console.WriteLine("Cannot find file '{0}'", args[0]);
28 | return;
29 | }
30 |
31 | // For IO there should be exception handling but in this case its been ommitted
32 |
33 | byte[] data = new byte[4096];
34 |
35 | using (ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) {
36 |
37 | ZipEntry theEntry;
38 | while ((theEntry = s.GetNextEntry()) != null) {
39 | Console.WriteLine("Name : {0}", theEntry.Name);
40 | Console.WriteLine("Date : {0}", theEntry.DateTime);
41 | Console.WriteLine("Size : (-1, if the size information is in the footer)");
42 | Console.WriteLine(" Uncompressed : {0}", theEntry.Size);
43 | Console.WriteLine(" Compressed : {0}", theEntry.CompressedSize);
44 |
45 | if ( theEntry.IsFile ) {
46 |
47 | // Assuming the contents are text may be ok depending on what you are doing
48 | // here its fine as its shows how data can be read from a Zip archive.
49 | Console.Write("Show entry text (y/n) ?");
50 |
51 | if (Console.ReadLine() == "y") {
52 | int size = s.Read(data, 0, data.Length);
53 | while (size > 0) {
54 | Console.Write(Encoding.ASCII.GetString(data, 0, size));
55 | size = s.Read(data, 0, data.Length);
56 | }
57 | }
58 | Console.WriteLine();
59 | }
60 | }
61 |
62 | // Close can be ommitted as the using statement will do it automatically
63 | // but leaving it here reminds you that is should be done.
64 | s.Close();
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/samples/cs/sz/sz.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}
7 | ICSharpCode.SharpZipLib.Samples.SZ
8 | sz
9 | Exe
10 | 4
11 | False
12 | False
13 | OnSuccessfulBuild
14 | False
15 | Auto
16 | 4194304
17 | AnyCPU
18 | 4096
19 |
20 |
21 | true
22 | True
23 | False
24 | True
25 | ..\bin\
26 | false
27 | Full
28 |
29 |
30 | True
31 | True
32 | False
33 | True
34 | bin\Release\
35 | True
36 |
37 |
38 |
39 |
40 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
41 | True
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/Web References/localhost/Reference.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version: 1.0.3705.288
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | //
12 | // This source code was auto-generated by Microsoft.VSDesigner, Version 1.0.3705.288.
13 | //
14 | namespace DimeDataSetServiceConsumer.localhost {
15 | using System.Diagnostics;
16 | using System.Xml.Serialization;
17 | using System;
18 | using System.Web.Services.Protocols;
19 | using System.ComponentModel;
20 | using System.Web.Services;
21 |
22 |
23 | ///
24 | [System.Diagnostics.DebuggerStepThroughAttribute()]
25 | [System.ComponentModel.DesignerCategoryAttribute("code")]
26 | [System.Web.Services.WebServiceBindingAttribute(Name="Service1Soap", Namespace="http://tempuri.org/")]
27 | public class Service1 : Microsoft.Web.Services.WebServicesClientProtocol { // base class is changed here
28 |
29 | ///
30 | public Service1() {
31 | this.Url = "http://localhost/DimeDataSetService/Service1.asmx";
32 | }
33 |
34 | ///
35 | [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetDataSet", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
36 | public void GetDataSet() {
37 | this.Invoke("GetDataSet", new object[0]);
38 | }
39 |
40 | ///
41 | public System.IAsyncResult BeginGetDataSet(System.AsyncCallback callback, object asyncState) {
42 | return this.BeginInvoke("GetDataSet", new object[0], callback, asyncState);
43 | }
44 |
45 | ///
46 | public void EndGetDataSet(System.IAsyncResult asyncResult) {
47 | this.EndInvoke(asyncResult);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/samples/cs/zf/zf.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {90E83588-261C-45A3-964F-4B707357D437}
7 | ICSharpCode.SharpZipLib.Samples.CS.ZF
8 | zf
9 | Exe
10 | 4
11 | False
12 | False
13 | OnSuccessfulBuild
14 | False
15 | Auto
16 | 4194304
17 | AnyCPU
18 | 4096
19 |
20 |
21 | true
22 | False
23 | False
24 | True
25 | bin\Debug\
26 | false
27 | Full
28 |
29 |
30 | False
31 | True
32 | False
33 | False
34 | bin\Release\
35 | False
36 |
37 |
38 |
39 |
40 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
41 | True
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/Core/IScanFilter.cs:
--------------------------------------------------------------------------------
1 | // IScanFilter.cs
2 | //
3 | // Copyright 2006 John Reilly
4 | //
5 | // This program is free software; you can redistribute it and/or
6 | // modify it under the terms of the GNU General Public License
7 | // as published by the Free Software Foundation; either version 2
8 | // of the License, or (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program; if not, write to the Free Software
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | //
19 | // Linking this library statically or dynamically with other modules is
20 | // making a combined work based on this library. Thus, the terms and
21 | // conditions of the GNU General Public License cover the whole
22 | // combination.
23 | //
24 | // As a special exception, the copyright holders of this library give you
25 | // permission to link this library with independent modules to produce an
26 | // executable, regardless of the license terms of these independent
27 | // modules, and to copy and distribute the resulting executable under
28 | // terms of your choice, provided that you also meet, for each linked
29 | // independent module, the terms and conditions of the license of that
30 | // module. An independent module is a module which is not derived from
31 | // or based on this library. If you modify this library, you may extend
32 | // this exception to your version of the library, but you are not
33 | // obligated to do so. If you do not wish to do so, delete this
34 | // exception statement from your version.
35 |
36 | namespace ICSharpCode.SharpZipLib.Core
37 | {
38 | ///
39 | /// Scanning filters support filtering of names.
40 | ///
41 | public interface IScanFilter
42 | {
43 | ///
44 | /// Test a name to see if it 'matches' the filter.
45 | ///
46 | /// The name to test.
47 | /// Returns true if the name matches the filter, false if it does not match.
48 | bool IsMatch(string name);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/samples/cs/tar/Tar.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | {12C2AD0C-B815-426D-AFF1-7787C2DCA0F0}
6 | 9.0.30729
7 | 2.0
8 | Exe
9 | false
10 | ConsoleApplication
11 | v3.5
12 | 512
13 | Tar
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}
46 | ICSharpCode.SharpZLib
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/SharpZipAll2005.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual Studio 2005
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZLib", "src\ICSharpCode.SharpZLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zf", "samples\cs\zf\zf.csproj", "{90E83588-261C-45A3-964F-4B707357D437}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sz", "samples\cs\sz\sz.csproj", "{CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpZipLibTests", "tests\SharpZipLibTests.csproj", "{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {90E83588-261C-45A3-964F-4B707357D437}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {90E83588-261C-45A3-964F-4B707357D437}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {90E83588-261C-45A3-964F-4B707357D437}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {90E83588-261C-45A3-964F-4B707357D437}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {CE0CEA62-CC91-4D17-BC57-A5FCACCA6A1F}.Release|Any CPU.Build.0 = Release|Any CPU
30 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {4F9BF21E-A7FC-4005-A1C7-A17108F7010D}.Release|Any CPU.Build.0 = Release|Any CPU
34 | EndGlobalSection
35 | GlobalSection(SolutionProperties) = preSolution
36 | HideSolutionNode = FALSE
37 | EndGlobalSection
38 | EndGlobal
39 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {E4AFB41C-DDBB-44AD-9D64-304B7FEE66C9}
7 | NewProject
8 | minibzip2
9 | WinExe
10 |
11 |
12 |
13 |
14 |
15 |
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | True
23 |
24 | True
25 |
26 | bin\
27 | True
28 |
29 |
30 | True
31 | True
32 |
33 | True
34 |
35 | \
36 | True
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
45 | True
46 |
47 |
48 |
49 |
50 | Form
51 |
52 |
53 |
54 | Main.vb
55 | Designer
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {DB53264C-64AD-4B43-91A9-F5325561C77B}
7 | NewProject
8 | viewzipfile
9 | WinExe
10 |
11 |
12 |
13 |
14 |
15 |
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | True
23 |
24 | True
25 |
26 | bin\
27 | True
28 |
29 |
30 | True
31 | True
32 |
33 | True
34 |
35 | \
36 | True
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
45 | True
46 |
47 |
48 |
49 |
50 | Form
51 |
52 |
53 |
54 | Main.vb
55 | Designer
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/Zip/Compression/DeflaterPending.cs:
--------------------------------------------------------------------------------
1 | // DeflaterPending.cs
2 | //
3 | // Copyright (C) 2001 Mike Krueger
4 | // Copyright (C) 2004 John Reilly
5 | //
6 | // This file was translated from java, it was part of the GNU Classpath
7 | // Copyright (C) 2001 Free Software Foundation, Inc.
8 | //
9 | // This program is free software; you can redistribute it and/or
10 | // modify it under the terms of the GNU General Public License
11 | // as published by the Free Software Foundation; either version 2
12 | // of the License, or (at your option) any later version.
13 | //
14 | // This program is distributed in the hope that it will be useful,
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | // GNU General Public License for more details.
18 | //
19 | // You should have received a copy of the GNU General Public License
20 | // along with this program; if not, write to the Free Software
21 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 | //
23 | // Linking this library statically or dynamically with other modules is
24 | // making a combined work based on this library. Thus, the terms and
25 | // conditions of the GNU General Public License cover the whole
26 | // combination.
27 | //
28 | // As a special exception, the copyright holders of this library give you
29 | // permission to link this library with independent modules to produce an
30 | // executable, regardless of the license terms of these independent
31 | // modules, and to copy and distribute the resulting executable under
32 | // terms of your choice, provided that you also meet, for each linked
33 | // independent module, the terms and conditions of the license of that
34 | // module. An independent module is a module which is not derived from
35 | // or based on this library. If you modify this library, you may extend
36 | // this exception to your version of the library, but you are not
37 | // obligated to do so. If you do not wish to do so, delete this
38 | // exception statement from your version.
39 |
40 | namespace ICSharpCode.SharpZipLib.Zip.Compression
41 | {
42 |
43 | ///
44 | /// This class stores the pending output of the Deflater.
45 | ///
46 | /// author of the original java version : Jochen Hoenicke
47 | ///
48 | public class DeflaterPending : PendingBuffer
49 | {
50 | ///
51 | /// Construct instance with default buffer size
52 | ///
53 | public DeflaterPending() : base(DeflaterConstants.PENDING_BUF_SIZE)
54 | {
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/minibzip2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {7520CE0B-F1D4-4148-8427-BB03669D7672}
7 | NewProject
8 | minibzip
9 | Exe
10 |
11 | 4
12 |
13 | False
14 | False
15 | OnSuccessfulBuild
16 |
17 |
18 |
19 |
20 | true
21 | True
22 | False
23 | True
24 | bin\
25 | false
26 | Full
27 |
28 |
29 | True
30 | True
31 | False
32 | True
33 |
34 | \
35 | False
36 |
37 |
38 | False
39 | Auto
40 | 4194304
41 | AnyCPU
42 | 4096
43 |
44 |
45 |
46 |
47 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
48 | True
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/samples/cs/tar/tar.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetServiceConsumer/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | //
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | //
9 | [assembly: AssemblyTitle("")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("")]
14 | [assembly: AssemblyCopyright("")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | //
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Revision and Build Numbers
27 | // by using the '*' as shown below:
28 |
29 | [assembly: AssemblyVersion("0.82.0.1709")]
30 |
31 | //
32 | // In order to sign your assembly you must specify a key to use. Refer to the
33 | // Microsoft .NET Framework documentation for more information on assembly signing.
34 | //
35 | // Use the attributes below to control which key is used for signing.
36 | //
37 | // Notes:
38 | // (*) If no key is specified, the assembly is not signed.
39 | // (*) KeyName refers to a key that has been installed in the Crypto Service
40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains
41 | // a key.
42 | // (*) If the KeyFile and the KeyName values are both specified, the
43 | // following processing occurs:
44 | // (1) If the KeyName can be found in the CSP, that key is used.
45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key
46 | // in the KeyFile is installed into the CSP and used.
47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
48 | // When specifying the KeyFile, the location of the KeyFile should be
49 | // relative to the project output directory which is
50 | // %Project Directory%\obj\. For example, if your KeyFile is
51 | // located in the project directory, you would specify the AssemblyKeyFile
52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
54 | // documentation for more information on this.
55 | //
56 | [assembly: AssemblyDelaySign(false)]
57 | [assembly: AssemblyKeyFile("")]
58 | [assembly: AssemblyKeyName("")]
59 |
--------------------------------------------------------------------------------
/samples/cs/sz/sz.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/cs/zf/zf.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/CreateZipFile.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {1B2FD768-E530-45B7-B14F-AE5D07B24485}
7 | CreateZipFile
8 | CreateZipFile
9 | WinExe
10 |
11 |
12 |
13 |
14 |
15 |
16 | OnSuccessfulBuild
17 |
18 |
19 |
20 |
21 | True
22 | True
23 |
24 | True
25 |
26 | bin\Debug\
27 | False
28 |
29 |
30 | False
31 | True
32 |
33 | False
34 |
35 | bin\Release\
36 | False
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
45 | True
46 |
47 |
48 |
49 |
50 | Form
51 |
52 |
53 |
54 | Designer
55 | MainForm.vb
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/samples/cs/zf/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | //
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | //
9 | [assembly: AssemblyTitle("ZF")]
10 | [assembly: AssemblyDescription("ZF A SharpZipLib Sample")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("")]
14 | [assembly: AssemblyCopyright("Copyright 2006 John Reilly")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | //
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Revision and Build Numbers
27 | // by using the '*' as shown below:
28 |
29 | [assembly: AssemblyVersion("0.85.4.369")]
30 |
31 | //
32 | // In order to sign your assembly you must specify a key to use. Refer to the
33 | // Microsoft .NET Framework documentation for more information on assembly signing.
34 | //
35 | // Use the attributes below to control which key is used for signing.
36 | //
37 | // Notes:
38 | // (*) If no key is specified, the assembly is not signed.
39 | // (*) KeyName refers to a key that has been installed in the Crypto Service
40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains
41 | // a key.
42 | // (*) If the KeyFile and the KeyName values are both specified, the
43 | // following processing occurs:
44 | // (1) If the KeyName can be found in the CSP, that key is used.
45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key
46 | // in the KeyFile is installed into the CSP and used.
47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
48 | // When specifying the KeyFile, the location of the KeyFile should be
49 | // relative to the project output directory which is
50 | // %Project Directory%\obj\. For example, if your KeyFile is
51 | // located in the project directory, you would specify the AssemblyKeyFile
52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
54 | // documentation for more information on this.
55 | //
56 | [assembly: AssemblyDelaySign(false)]
57 | [assembly: AssemblyKeyFile("")]
58 | [assembly: AssemblyKeyName("")]
59 |
--------------------------------------------------------------------------------
/samples/cs/FastZip/FastZip.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/Core/INameTransform.cs:
--------------------------------------------------------------------------------
1 | // INameTransform.cs
2 | //
3 | // Copyright 2005 John Reilly
4 | //
5 | // This program is free software; you can redistribute it and/or
6 | // modify it under the terms of the GNU General Public License
7 | // as published by the Free Software Foundation; either version 2
8 | // of the License, or (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program; if not, write to the Free Software
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | //
19 | // Linking this library statically or dynamically with other modules is
20 | // making a combined work based on this library. Thus, the terms and
21 | // conditions of the GNU General Public License cover the whole
22 | // combination.
23 | //
24 | // As a special exception, the copyright holders of this library give you
25 | // permission to link this library with independent modules to produce an
26 | // executable, regardless of the license terms of these independent
27 | // modules, and to copy and distribute the resulting executable under
28 | // terms of your choice, provided that you also meet, for each linked
29 | // independent module, the terms and conditions of the license of that
30 | // module. An independent module is a module which is not derived from
31 | // or based on this library. If you modify this library, you may extend
32 | // this exception to your version of the library, but you are not
33 | // obligated to do so. If you do not wish to do so, delete this
34 | // exception statement from your version.
35 |
36 | namespace ICSharpCode.SharpZipLib.Core
37 | {
38 | ///
39 | /// INameTransform defines how file system names are transformed for use with archives, or vice versa.
40 | ///
41 | public interface INameTransform
42 | {
43 | ///
44 | /// Given a file name determine the transformed value.
45 | ///
46 | /// The name to transform.
47 | /// The transformed file name.
48 | string TransformFile(string name);
49 |
50 | ///
51 | /// Given a directory name determine the transformed value.
52 | ///
53 | /// The name to transform.
54 | /// The transformed directory name
55 | string TransformDirectory(string name);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/readme.txt:
--------------------------------------------------------------------------------
1 | == Version History ==
2 | 1.1 ---------
3 |
4 | MAJOR CHANGES THAT WILL AFFECT YOU
5 | - the assembly is now named HttpCompressionModule.dll
6 | - the config section handler is now HttpCompressionModuleSectionHandler
7 | - YOU WILL NEED TO UPDATE YOUR CONFIG FILES
8 | FOR THIS VERSION TO WORK (see samples for direction)
9 |
10 | Other stuff
11 | - moved to SharpZipLib (formerly NZipLib) 0.31 which
12 | contains a bunch of bug fixes. This means I just
13 | inherited a bunch of bug fixes. yay!
14 | - updated the code to use the new ICSharpCode namespace
15 | - reworked the way the configuration works
16 | - no more generic http modules. i'm only writing this
17 | one, so this made the code simpler
18 | - removed the Unspecified flag on the Enums. Not needed.
19 | now, it defaults to Deflate + Normal
20 | - decided to not support config parenting, as it doesn't
21 | really make sense for this
22 | - pulled out some trace stuff from the DEBUG version that
23 | didn't need to be there
24 | - actually shipping compiled versions, both DEBUG and RELEASE
25 | - added examples.
26 |
27 |
28 | 1.0 ---------
29 | - initial introduction
30 |
31 | === Introduction ==
32 | Hey there,
33 |
34 | Thanks for downloading my compressing filter for ASP.NET! As
35 | you can see, the full source is provided so you can
36 | understand how it works and modify it if you want.
37 |
38 | If you don't have visual studio, no fear. The whole project
39 | lives in one directory, so csc *.cs should work, you just need
40 | to add a reference to the supplied SharpZipLib.dll.
41 |
42 | To get you going, read the docs on msdn regarding HttpModules.
43 | That's how this thing works, as an HttpModule. An HttpModule
44 | is a little chunk of code that gets slipped into the HttpRuntime
45 | via the web.config file. It hooks an event in the HttpApplication
46 | object and responds to it. In this case, I'm hooking BeginRequest
47 | and setting a new Stream on the HttpResponse.Filter to compress
48 | the output.
49 |
50 | For instructions on how to slip the HttpCompressionModule in,
51 | see the provided web.config file. It shows what entries have
52 | to be added to the web.config to set things up.
53 |
54 | So, to get things going, here's what you have to do:
55 | 1) compile the project into a library (or just use the
56 | version in /lib)
57 | 2) move the .dll that comes from compilation to the /bin directory of
58 | your asp.net web app
59 | 3) add the entries to the web.config of your asp.net app
60 |
61 | That's it. That should get you going.
62 |
63 |
64 |
65 | --b
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/Service1.asmx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Web;
7 | using System.Web.Services;
8 |
9 |
10 | // using statements necessary for DIME
11 | using Microsoft.Web.Services.Dime;
12 | using Microsoft.Web.Services;
13 | using System.Net;
14 |
15 | // using statements necessary for this sample application
16 | using System.IO;
17 | using System.Data.SqlClient;
18 | using ICSharpCode.SharpZipLib.GZip;
19 |
20 | namespace DimeDataSetService
21 | {
22 | ///
23 | /// Summary description for Service1.
24 | ///
25 | public class Service1 : System.Web.Services.WebService
26 | {
27 | public Service1()
28 | {
29 | //CODEGEN: This call is required by the ASP.NET Web Services Designer
30 | InitializeComponent();
31 | }
32 |
33 | #region Component Designer generated code
34 |
35 | //Required by the Web Services Designer
36 | private IContainer components = null;
37 |
38 | ///
39 | /// Required method for Designer support - do not modify
40 | /// the contents of this method with the code editor.
41 | ///
42 | private void InitializeComponent()
43 | {
44 | }
45 |
46 | ///
47 | /// Clean up any resources being used.
48 | ///
49 | protected override void Dispose( bool disposing )
50 | {
51 | if(disposing && components != null)
52 | {
53 | components.Dispose();
54 | }
55 | base.Dispose(disposing);
56 | }
57 |
58 | #endregion
59 |
60 | [WebMethod]
61 | public void GetDataSet()
62 | {
63 | SoapContext sc = HttpSoapContext.ResponseContext;
64 | if (null == sc)
65 | {
66 | throw new ApplicationException("Only SOAP requests allowed");
67 | }
68 |
69 | SqlConnection conn = new SqlConnection(@"data source=(local)\NetSDK;" +
70 | "initial catalog=Northwind;integrated security=SSPI");
71 |
72 | SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM customers", conn);
73 | DataSet ds = new DataSet("CustomerDS");
74 | da.Fill(ds, "Customers");
75 |
76 | // dispose of all objects that are no longer necessary
77 | da.Dispose();
78 | conn.Dispose();
79 |
80 | MemoryStream memoryStream = new MemoryStream(1024);
81 | GZipOutputStream gzipStream = new GZipOutputStream(memoryStream);
82 | ds.WriteXml(gzipStream);
83 | gzipStream.Finish();
84 | memoryStream.Seek(0, SeekOrigin.Begin);
85 |
86 | DimeAttachment dimeAttachment = new DimeAttachment("application/x-gzip",
87 | TypeFormatEnum.MediaType,
88 | memoryStream);
89 |
90 | sc.Attachments.Add(dimeAttachment);
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/CreateZipFile.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {DF63551E-BB6C-4A8D-9B01-DB94F721E74A}
7 | NewProject
8 | CreateZipFile
9 | Exe
10 |
11 | 4
12 |
13 | False
14 | False
15 | OnSuccessfulBuild
16 |
17 |
18 |
19 |
20 | true
21 | True
22 | False
23 | True
24 | bin\
25 | false
26 | Full
27 |
28 |
29 | True
30 | True
31 | False
32 | True
33 | \
34 | False
35 |
36 |
37 | False
38 | Auto
39 | 4194304
40 | AnyCPU
41 | 4096
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
51 | True
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/samples/cs/minibzip2/minibzip2.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/zipfiletest.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/cs/unzipfile/unzipfile.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/cs/viewzipfile/viewzipfile.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/vb/minibzip2/minibzip2.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/cs/minigzip/minigzip.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/vb/CreateZipFile/CreateZipFile.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/vb/viewzipfile/viewzipfile.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/cs/zipfiletest/ZipFileTest.cs:
--------------------------------------------------------------------------------
1 | // SharpZipLibrary samples
2 | // Copyright (c) 2007, AlphaSierraPapa
3 | // All rights reserved.
4 | //
5 | // Redistribution and use in source and binary forms, with or without modification, are
6 | // permitted provided that the following conditions are met:
7 | //
8 | // - Redistributions of source code must retain the above copyright notice, this list
9 | // of conditions and the following disclaimer.
10 | //
11 | // - Redistributions in binary form must reproduce the above copyright notice, this list
12 | // of conditions and the following disclaimer in the documentation and/or other materials
13 | // provided with the distribution.
14 | //
15 | // - Neither the name of the SharpDevelop team nor the names of its contributors may be used to
16 | // endorse or promote products derived from this software without specific prior written
17 | // permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
20 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 | // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 | // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 | // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
28 | using System;
29 | using System.Text;
30 | using System.Collections;
31 | using System.IO;
32 |
33 | using ICSharpCode.SharpZipLib.Zip;
34 |
35 | class MainClass
36 | {
37 | static public void Main(string[] args)
38 | {
39 | if ( args.Length < 1 ) {
40 | Console.WriteLine("Usage: ZipList file");
41 | return;
42 | }
43 |
44 | if ( !File.Exists(args[0]) ) {
45 | Console.WriteLine("Cannot find file");
46 | return;
47 | }
48 |
49 | using (ZipFile zFile = new ZipFile(args[0])) {
50 | Console.WriteLine("Listing of : " + zFile.Name);
51 | Console.WriteLine("");
52 | Console.WriteLine("Raw Size Size Date Time Name");
53 | Console.WriteLine("-------- -------- -------- ------ ---------");
54 | foreach (ZipEntry e in zFile) {
55 | DateTime d = e.DateTime;
56 | Console.WriteLine("{0, -10}{1, -10}{2} {3} {4}", e.Size, e.CompressedSize,
57 | d.ToString("dd-MM-yy"), d.ToString("HH:mm"),
58 | e.Name);
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/samples/cs/CreateZipFile/CreateZipFile.prjx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/samples/DIME/DimeDataSetService/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | //
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | //
9 | [assembly: AssemblyTitle("")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("")]
14 | [assembly: AssemblyCopyright("")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | //
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Revision and Build Numbers
27 | // by using the '*' as shown below:
28 |
29 | [assembly: AssemblyVersion("0.82.0.1709")]
30 |
31 | //
32 | // In order to sign your assembly you must specify a key to use. Refer to the
33 | // Microsoft .NET Framework documentation for more information on assembly signing.
34 | //
35 | // Use the attributes below to control which key is used for signing.
36 | //
37 | // Notes:
38 | // (*) If no key is specified, the assembly is not signed.
39 | // (*) KeyName refers to a key that has been installed in the Crypto Service
40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains
41 | // a key.
42 | // (*) If the KeyFile and the KeyName values are both specified, the
43 | // following processing occurs:
44 | // (1) If the KeyName can be found in the CSP, that key is used.
45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key
46 | // in the KeyFile is installed into the CSP and used.
47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
48 | // When specifying the KeyFile, the location of the KeyFile should be
49 | // relative to the "project output directory". The location of the project output
50 | // directory is dependent on whether you are working with a local or web project.
51 | // For local projects, the project output directory is defined as
52 | // \obj\. For example, if your KeyFile is
53 | // located in the project directory, you would specify the AssemblyKeyFile
54 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
55 | // For web projects, the project output directory is defined as
56 | // %HOMEPATH%\VSWebCache\\\obj\.
57 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
58 | // documentation for more information on this.
59 | //
60 | [assembly: AssemblyDelaySign(false)]
61 | [assembly: AssemblyKeyFile("")]
62 | [assembly: AssemblyKeyName("")]
63 |
--------------------------------------------------------------------------------
/samples/vb/zipfiletest/zipfiletest.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Debug
4 | AnyCPU
5 | 2.0
6 | {54057AFD-35E2-48C3-8419-45D57C351C1F}
7 | NewProject
8 | zipfiletest
9 | WinExe
10 |
11 | 4
12 |
13 |
14 |
15 | OnSuccessfulBuild
16 |
17 |
18 | False
19 | On
20 | Off
21 | Binary
22 |
23 |
24 | true
25 | True
26 |
27 | True
28 | bin\
29 | true
30 | Full
31 |
32 |
33 | True
34 | True
35 |
36 | True
37 |
38 | \
39 | True
40 |
41 |
42 | False
43 | Auto
44 | 4194304
45 | AnyCPU
46 |
47 |
48 |
49 |
50 |
51 |
52 | ..\..\..\bin\ICSharpCode.SharpZipLib.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 | Form
60 |
61 |
62 | Main.vb
63 | Designer
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/samples/HttpCompressionModule/src/DeflateFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | using ICSharpCode.SharpZipLib.Zip.Compression;
5 | using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
6 |
7 | namespace blowery.Web.HttpModules {
8 | ///
9 | /// Summary description for DeflateFilter.
10 | ///
11 | public class DeflateFilter : HttpCompressingFilter {
12 |
13 | ///
14 | /// compression stream member
15 | /// has to be a member as we can only have one instance of the
16 | /// actual filter class
17 | ///
18 | private DeflaterOutputStream m_stream = null;
19 |
20 | ///
21 | /// Basic constructor that uses the Normal compression level
22 | ///
23 | /// The stream to wrap up with the deflate algorithm
24 | public DeflateFilter(Stream baseStream) : this(baseStream, CompressionLevels.Normal) { }
25 |
26 | ///
27 | /// Full constructor that allows you to set the wrapped stream and the level of compression
28 | ///
29 | /// The stream to wrap up with the deflate algorithm
30 | /// The level of compression to use
31 | public DeflateFilter(Stream baseStream, CompressionLevels compressionLevel) : base(baseStream, compressionLevel) { }
32 |
33 | ///
34 | /// Write out bytes to the underlying stream after compressing them using deflate
35 | ///
36 | /// The array of bytes to write
37 | /// The offset into the supplied buffer to start
38 | /// The number of bytes to write
39 | public override void Write(byte[] buffer, int offset, int count) {
40 |
41 | if (m_stream == null) {
42 | Deflater deflater;
43 |
44 | switch(CompressionLevel) {
45 | case CompressionLevels.High:
46 | deflater = new Deflater(Deflater.BEST_COMPRESSION, true);
47 | break;
48 | case CompressionLevels.Low:
49 | deflater = new Deflater(Deflater.BEST_SPEED, true);
50 | break;
51 | case CompressionLevels.Normal:
52 | default:
53 | deflater = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
54 | break;
55 | }
56 | m_stream = new DeflaterOutputStream(BaseStream, deflater);
57 | }
58 | m_stream.Write(buffer, offset, count);
59 | }
60 |
61 | ///
62 | /// Return the Http name for this encoding. Here, deflate.
63 | ///
64 | public override string NameOfContentEncoding {
65 | get { return "deflate"; }
66 | }
67 |
68 | ///
69 | /// Closes this Filter and calls the base class implementation.
70 | ///
71 | public override void Close() {
72 | if (m_stream != null)
73 | m_stream.Finish();
74 | base.Close();
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/samples/cs/unzipfile/UnZipFile.cs:
--------------------------------------------------------------------------------
1 | // SharpZipLibrary samples
2 | // Copyright (c) 2007, AlphaSierraPapa
3 | // All rights reserved.
4 | //
5 | // Redistribution and use in source and binary forms, with or without modification, are
6 | // permitted provided that the following conditions are met:
7 | //
8 | // - Redistributions of source code must retain the above copyright notice, this list
9 | // of conditions and the following disclaimer.
10 | //
11 | // - Redistributions in binary form must reproduce the above copyright notice, this list
12 | // of conditions and the following disclaimer in the documentation and/or other materials
13 | // provided with the distribution.
14 | //
15 | // - Neither the name of the SharpDevelop team nor the names of its contributors may be used to
16 | // endorse or promote products derived from this software without specific prior written
17 | // permission.
18 | //
19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &AS IS& AND ANY EXPRESS
20 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21 | // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 | // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 | // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
28 | using System;
29 | using System.Text;
30 | using System.Collections;
31 | using System.IO;
32 |
33 | using ICSharpCode.SharpZipLib.Zip;
34 | using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
35 |
36 |
37 | class MainClass
38 | {
39 | public static void Main(string[] args)
40 | {
41 | // Perform simple parameter checking.
42 | if ( args.Length < 1 ) {
43 | Console.WriteLine("Usage UnzipFile NameOfFile");
44 | return;
45 | }
46 |
47 | if ( !File.Exists(args[0]) ) {
48 | Console.WriteLine("Cannot find file '{0}'", args[0]);
49 | return;
50 | }
51 |
52 | using (ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) {
53 |
54 | ZipEntry theEntry;
55 | while ((theEntry = s.GetNextEntry()) != null) {
56 |
57 | Console.WriteLine(theEntry.Name);
58 |
59 | string directoryName = Path.GetDirectoryName(theEntry.Name);
60 | string fileName = Path.GetFileName(theEntry.Name);
61 |
62 | // create directory
63 | if ( directoryName.Length > 0 ) {
64 | Directory.CreateDirectory(directoryName);
65 | }
66 |
67 | if (fileName != String.Empty) {
68 | using (FileStream streamWriter = File.Create(theEntry.Name)) {
69 |
70 | int size = 2048;
71 | byte[] data = new byte[2048];
72 | while (true) {
73 | size = s.Read(data, 0, data.Length);
74 | if (size > 0) {
75 | streamWriter.Write(data, 0, size);
76 | } else {
77 | break;
78 | }
79 | }
80 | }
81 | }
82 | }
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/tests/Lzw/LzwTests.cs:
--------------------------------------------------------------------------------
1 | using ICSharpCode.SharpZipLib.LZW;
2 | using NUnit.Framework;
3 | using System.IO;
4 | using ICSharpCode.SharpZipLib.Tests.TestSupport;
5 |
6 | namespace ICSharpCode.SharpZipLib.Tests.LZW
7 | {
8 |
9 | [TestFixture]
10 | public class LzwTestSuite {
11 | //[Test]
12 | //[Category("LZW")]
13 | //public void TestLzw() {
14 | // LzwInputStream str = new LzwInputStream(File.OpenRead("D:\\hour2890.09n.Z"));
15 | // Stream raw = File.OpenRead("D:\\hour2890.09n");
16 | // byte[] data = new byte[1028 * 1028];
17 | // byte[] dataRaw = new byte[1028 * 1028];
18 | // raw.Read(dataRaw, 0, 1028);
19 | // str.Read(data, 0, 1028);
20 | // for (int i = 0; i < 1028; i++) {
21 | // Assert.AreEqual(data[i], dataRaw[i]);
22 | // }
23 |
24 | // Stream output = File.Open("D:\\erase.txt", FileMode.CreateNew);
25 | // output.Write(data, 0, 1028);
26 | // output.Close();
27 | // raw.Close();
28 | //}
29 |
30 | //[Test]
31 | //[Category("LZW")]
32 | //public void TestStream() {
33 | // using (Stream inStream = new LzwInputStream(File.OpenRead("D:\\hour2890.09n.Z")))
34 | // using (FileStream outStream = File.Create("D:\\hour2890.09n")) {
35 | // byte[] buffer = new byte[4096];
36 | // StreamUtils.Copy(inStream, outStream, buffer);
37 | // }
38 | //}
39 |
40 | [Test]
41 | [Category("LZW")]
42 | public void ZeroLengthInputStream() {
43 | LzwInputStream lis = new LzwInputStream(new MemoryStream());
44 | bool exception = false;
45 | try {
46 | lis.ReadByte();
47 | } catch {
48 | exception = true;
49 | }
50 |
51 | Assert.IsTrue(exception, "reading from an empty stream should cause an exception");
52 | }
53 |
54 |
55 | [Test]
56 | [Category("LZW")]
57 | public void InputStreamOwnership() {
58 | TrackedMemoryStream memStream = new TrackedMemoryStream();
59 | LzwInputStream s = new LzwInputStream(memStream);
60 |
61 | Assert.IsFalse(memStream.IsClosed, "Shouldnt be closed initially");
62 | Assert.IsFalse(memStream.IsDisposed, "Shouldnt be disposed initially");
63 |
64 | s.Close();
65 |
66 | Assert.IsTrue(memStream.IsClosed, "Should be closed after parent owner close");
67 | Assert.IsTrue(memStream.IsDisposed, "Should be disposed after parent owner close");
68 |
69 | memStream = new TrackedMemoryStream();
70 | s = new LzwInputStream(memStream);
71 |
72 | Assert.IsFalse(memStream.IsClosed, "Shouldnt be closed initially");
73 | Assert.IsFalse(memStream.IsDisposed, "Shouldnt be disposed initially");
74 |
75 | s.IsStreamOwner = false;
76 | s.Close();
77 |
78 | Assert.IsFalse(memStream.IsClosed, "Should not be closed after parent owner close");
79 | Assert.IsFalse(memStream.IsDisposed, "Should not be disposed after parent owner close");
80 |
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/VirtualFileSystem/IVirtualFileSystem.cs:
--------------------------------------------------------------------------------
1 | #if PCL
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace ICSharpCode.SharpZipLib.VirtualFileSystem
9 | {
10 |
11 | ///
12 | /// Interface providing Virtual File System access
13 | ///
14 | public interface IVirtualFileSystem
15 | {
16 |
17 | ///
18 | /// List directory files
19 | ///
20 | IEnumerable GetFiles(string directory);
21 |
22 | ///
23 | /// List directories
24 | ///
25 | IEnumerable GetDirectories(string directory);
26 |
27 | ///
28 | /// Get the full path for a file
29 | ///
30 | string GetFullPath(string path);
31 |
32 | ///
33 | /// Get the informations of a directory
34 | ///
35 | IDirectoryInfo GetDirectoryInfo(string directoryName);
36 |
37 | ///
38 | /// Get the informations of a file
39 | ///
40 | IFileInfo GetFileInfo(string filename);
41 |
42 | ///
43 | /// Define the last write time
44 | ///
45 | void SetLastWriteTime(string name, DateTime dateTime);
46 |
47 | ///
48 | /// Define the attributes
49 | ///
50 | ///
51 | ///
52 | void SetAttributes(string name, FileAttributes attributes);
53 |
54 | ///
55 | /// Create a new directory
56 | ///
57 | void CreateDirectory(string directory);
58 |
59 | ///
60 | /// Create a temporary file name
61 | ///
62 | string GetTempFileName();
63 |
64 | ///
65 | /// Copy a file
66 | ///
67 | void CopyFile(string fromFileName, string toFileName, bool overwrite);
68 |
69 | ///
70 | /// Move a file
71 | ///
72 | void MoveFile(string fromFileName, string toFileName);
73 |
74 | ///
75 | /// Delete a file
76 | ///
77 | void DeleteFile(string fileName);
78 |
79 | ///
80 | /// Create an new file
81 | ///
82 | VfsStream CreateFile(String filename);
83 |
84 | ///
85 | /// Open file for read
86 | ///
87 | VfsStream OpenReadFile(String filename);
88 |
89 | ///
90 | /// Open existing file for write
91 | ///
92 | VfsStream OpenWriteFile(String filename);
93 |
94 | ///
95 | /// Current directory
96 | ///
97 | String CurrentDirectory { get; }
98 |
99 | ///
100 | /// Directory separator
101 | ///
102 | Char DirectorySeparatorChar { get; }
103 |
104 | }
105 |
106 | }
107 | #endif
--------------------------------------------------------------------------------
/src/GZip/GZIPConstants.cs:
--------------------------------------------------------------------------------
1 | // GZipConstants.cs
2 | //
3 | // Copyright (C) 2001 Mike Krueger
4 | //
5 | // This file was translated from java, it was part of the GNU Classpath
6 | // Copyright (C) 2001 Free Software Foundation, Inc.
7 | //
8 | // This program is free software; you can redistribute it and/or
9 | // modify it under the terms of the GNU General Public License
10 | // as published by the Free Software Foundation; either version 2
11 | // of the License, or (at your option) any later version.
12 | //
13 | // This program is distributed in the hope that it will be useful,
14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | // GNU General Public License for more details.
17 | //
18 | // You should have received a copy of the GNU General Public License
19 | // along with this program; if not, write to the Free Software
20 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 | //
22 | // Linking this library statically or dynamically with other modules is
23 | // making a combined work based on this library. Thus, the terms and
24 | // conditions of the GNU General Public License cover the whole
25 | // combination.
26 | //
27 | // As a special exception, the copyright holders of this library give you
28 | // permission to link this library with independent modules to produce an
29 | // executable, regardless of the license terms of these independent
30 | // modules, and to copy and distribute the resulting executable under
31 | // terms of your choice, provided that you also meet, for each linked
32 | // independent module, the terms and conditions of the license of that
33 | // module. An independent module is a module which is not derived from
34 | // or based on this library. If you modify this library, you may extend
35 | // this exception to your version of the library, but you are not
36 | // obligated to do so. If you do not wish to do so, delete this
37 | // exception statement from your version.
38 |
39 | namespace ICSharpCode.SharpZipLib.GZip
40 | {
41 |
42 | ///
43 | /// This class contains constants used for gzip.
44 | ///
45 | sealed public class GZipConstants
46 | {
47 | ///
48 | /// Magic number found at start of GZIP header
49 | ///
50 | public const int GZIP_MAGIC = 0x1F8B;
51 |
52 | /* The flag byte is divided into individual bits as follows:
53 |
54 | bit 0 FTEXT
55 | bit 1 FHCRC
56 | bit 2 FEXTRA
57 | bit 3 FNAME
58 | bit 4 FCOMMENT
59 | bit 5 reserved
60 | bit 6 reserved
61 | bit 7 reserved
62 | */
63 |
64 | ///
65 | /// Flag bit mask for text
66 | ///
67 | public const int FTEXT = 0x1;
68 |
69 | ///
70 | /// Flag bitmask for Crc
71 | ///
72 | public const int FHCRC = 0x2;
73 |
74 | ///
75 | /// Flag bit mask for extra
76 | ///
77 | public const int FEXTRA = 0x4;
78 |
79 | ///
80 | /// flag bitmask for name
81 | ///
82 | public const int FNAME = 0x8;
83 |
84 | ///
85 | /// flag bit mask indicating comment is present
86 | ///
87 | public const int FCOMMENT = 0x10;
88 |
89 | ///
90 | /// Initialise default instance.
91 | ///
92 | /// Constructor is private to prevent instances being created.
93 | GZipConstants()
94 | {
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/src/Tar/TarException.cs:
--------------------------------------------------------------------------------
1 | // TarException.cs
2 | //
3 | // Copyright 2004 John Reilly
4 | //
5 | // This program is free software; you can redistribute it and/or
6 | // modify it under the terms of the GNU General Public License
7 | // as published by the Free Software Foundation; either version 2
8 | // of the License, or (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program; if not, write to the Free Software
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | //
19 | // Linking this library statically or dynamically with other modules is
20 | // making a combined work based on this library. Thus, the terms and
21 | // conditions of the GNU General Public License cover the whole
22 | // combination.
23 | //
24 | // As a special exception, the copyright holders of this library give you
25 | // permission to link this library with independent modules to produce an
26 | // executable, regardless of the license terms of these independent
27 | // modules, and to copy and distribute the resulting executable under
28 | // terms of your choice, provided that you also meet, for each linked
29 | // independent module, the terms and conditions of the license of that
30 | // module. An independent module is a module which is not derived from
31 | // or based on this library. If you modify this library, you may extend
32 | // this exception to your version of the library, but you are not
33 | // obligated to do so. If you do not wish to do so, delete this
34 | // exception statement from your version.
35 |
36 | using System;
37 |
38 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
39 | using System.Runtime.Serialization;
40 | #endif
41 |
42 | namespace ICSharpCode.SharpZipLib.Tar {
43 |
44 | ///
45 | /// TarExceptions are used for exceptions specific to tar classes and code.
46 | ///
47 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
48 | [Serializable]
49 | #endif
50 | public class TarException : SharpZipBaseException
51 | {
52 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
53 | ///
54 | /// Deserialization constructor
55 | ///
56 | /// for this constructor
57 | /// for this constructor
58 | protected TarException(SerializationInfo info, StreamingContext context)
59 | : base(info, context)
60 |
61 | {
62 | }
63 | #endif
64 |
65 | ///
66 | /// Initialises a new instance of the TarException class.
67 | ///
68 | public TarException()
69 | {
70 | }
71 |
72 | ///
73 | /// Initialises a new instance of the TarException class with a specified message.
74 | ///
75 | /// The message that describes the error.
76 | public TarException(string message)
77 | : base(message)
78 | {
79 | }
80 |
81 | ///
82 | ///
83 | ///
84 | /// A message describing the error.
85 | /// The exception that is the cause of the current exception.
86 | public TarException(string message, Exception exception)
87 | : base(message, exception)
88 | {
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/SharpZipLib.shfb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | The root namespace for this library.
8 | BZip2 compression handling
9 | Checksum Handling
10 | Core Utilities
11 | Encryption handling
12 | GZip compression handling
13 | Tape Archive handling
14 | ZIP archive handling
15 | Zip Compression handling
16 | Zip compression streams.
17 |
18 | Welcome to the #Zip compression library!
19 | Summary, Parameter, Returns, AutoDocumentCtors, Namespace
20 | InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected
21 |
22 |
23 | C:\Common\User\John\Development\SharpZipLib\trunk\SharpZipLib\current\doc\
24 |
25 |
26 | True
27 | True
28 | HtmlHelp1x
29 | True
30 | False
31 | 2.0.50727
32 | True
33 | False
34 | False
35 | False
36 |
37 | ICSharpCode.SharpZipLib Compression Library
38 | SharpZipLib
39 | en-US
40 |
41 |
42 |
43 |
44 |
45 | Local
46 | Msdn
47 | Blank
48 | Prototype
49 | Guid
50 | Standard
51 | False
52 | AboveNamespaces
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/BZip2/BZip2Exception.cs:
--------------------------------------------------------------------------------
1 | // BZip2.cs
2 | //
3 | // Copyright 2004 John Reilly
4 | //
5 | // This program is free software; you can redistribute it and/or
6 | // modify it under the terms of the GNU General Public License
7 | // as published by the Free Software Foundation; either version 2
8 | // of the License, or (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program; if not, write to the Free Software
17 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 | //
19 | // Linking this library statically or dynamically with other modules is
20 | // making a combined work based on this library. Thus, the terms and
21 | // conditions of the GNU General Public License cover the whole
22 | // combination.
23 | //
24 | // As a special exception, the copyright holders of this library give you
25 | // permission to link this library with independent modules to produce an
26 | // executable, regardless of the license terms of these independent
27 | // modules, and to copy and distribute the resulting executable under
28 | // terms of your choice, provided that you also meet, for each linked
29 | // independent module, the terms and conditions of the license of that
30 | // module. An independent module is a module which is not derived from
31 | // or based on this library. If you modify this library, you may extend
32 | // this exception to your version of the library, but you are not
33 | // obligated to do so. If you do not wish to do so, delete this
34 | // exception statement from your version.
35 |
36 | using System;
37 |
38 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
39 | using System.Runtime.Serialization;
40 | #endif
41 |
42 | namespace ICSharpCode.SharpZipLib.BZip2
43 | {
44 | ///
45 | /// BZip2Exception represents exceptions specific to Bzip2 algorithm
46 | ///
47 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
48 | [Serializable]
49 | #endif
50 | public class BZip2Exception : SharpZipBaseException
51 | {
52 |
53 | #if !NETCF_1_0 && !NETCF_2_0 && !PCL
54 | ///
55 | /// Deserialization constructor
56 | ///
57 | /// for this constructor
58 | /// for this constructor
59 | protected BZip2Exception(SerializationInfo info, StreamingContext context)
60 | : base(info, context)
61 |
62 | {
63 | }
64 | #endif
65 | ///
66 | /// Initialise a new instance of BZip2Exception.
67 | ///
68 | public BZip2Exception()
69 | {
70 | }
71 |
72 | ///
73 | /// Initialise a new instance of BZip2Exception with its message set to message.
74 | ///
75 | /// The message describing the error.
76 | public BZip2Exception(string message) : base(message)
77 | {
78 | }
79 |
80 | ///
81 | /// Initialise an instance of BZip2Exception
82 | ///
83 | /// A message describing the error.
84 | /// The exception that is the cause of the current exception.
85 | public BZip2Exception(string message, Exception exception)
86 | : base(message, exception)
87 | {
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------