From 7baa3d795c87c11550f1686488c968320428cbf9 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Jun 2012 15:53:45 +0200 Subject: Switch to zlib 1.2.7 --- zlib/contrib/dotzlib/DotZLib.build | 4 ++-- zlib/contrib/dotzlib/DotZLib.chm | Bin 72728 -> 72726 bytes zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs | 20 ++++++++++---------- zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs | 10 +++++----- zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs | 4 ++-- zlib/contrib/dotzlib/DotZLib/CodecBase.cs | 8 ++++---- zlib/contrib/dotzlib/DotZLib/Deflater.cs | 6 +++--- zlib/contrib/dotzlib/DotZLib/DotZLib.cs | 20 ++++++++++---------- zlib/contrib/dotzlib/DotZLib/GZipStream.cs | 18 +++++++++--------- zlib/contrib/dotzlib/DotZLib/Inflater.cs | 6 +++--- zlib/contrib/dotzlib/DotZLib/UnitTests.cs | 8 ++++---- zlib/contrib/dotzlib/readme.txt | 18 +++++++++--------- 12 files changed, 61 insertions(+), 61 deletions(-) (limited to 'zlib/contrib/dotzlib') diff --git a/zlib/contrib/dotzlib/DotZLib.build b/zlib/contrib/dotzlib/DotZLib.build index ed19cc9dc..7f90d6bc7 100644 --- a/zlib/contrib/dotzlib/DotZLib.build +++ b/zlib/contrib/dotzlib/DotZLib.build @@ -4,7 +4,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/zlib/contrib/dotzlib/DotZLib.chm b/zlib/contrib/dotzlib/DotZLib.chm index 0bc7df76e..f214a444a 100644 Binary files a/zlib/contrib/dotzlib/DotZLib.chm and b/zlib/contrib/dotzlib/DotZLib.chm differ diff --git a/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs index 6fc0fdcc2..0491bfc2b 100644 --- a/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +++ b/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Reflection; using System.Runtime.CompilerServices; // -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // @@ -13,42 +13,42 @@ using System.Runtime.CompilerServices; [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCulture("")] // // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Revision and Build Numbers +// You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.*")] // -// In order to sign your assembly you must specify a key to use. Refer to the +// In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // -// Use the attributes below to control which key is used for signing. +// Use the attributes below to control which key is used for signing. // -// Notes: +// Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. -// (*) If the KeyFile and the KeyName values are both specified, the +// (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key +// (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory which is // %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile +// located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. diff --git a/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs index dfe7e90a8..788b2fcec 100644 --- a/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +++ b/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -25,7 +25,7 @@ namespace DotZLib protected uint _current; /// - /// Initializes a new instance of the checksum generator base - the current checksum is + /// Initializes a new instance of the checksum generator base - the current checksum is /// set to zero /// public ChecksumGeneratorBase() @@ -61,7 +61,7 @@ namespace DotZLib /// The sum of offset and count is larger than the length of data /// data is a null reference /// Offset or count is negative. - /// All the other Update methods are implmeneted in terms of this one. + /// All the other Update methods are implmeneted in terms of this one. /// This is therefore the only method a derived class has to implement public abstract void Update(byte[] data, int offset, int count); @@ -101,7 +101,7 @@ namespace DotZLib /// /// Implements a CRC32 checksum generator /// - public sealed class CRC32Checksum : ChecksumGeneratorBase + public sealed class CRC32Checksum : ChecksumGeneratorBase { #region DLL imports @@ -152,7 +152,7 @@ namespace DotZLib /// /// Implements a checksum generator that computes the Adler checksum on data /// - public sealed class AdlerChecksum : ChecksumGeneratorBase + public sealed class AdlerChecksum : ChecksumGeneratorBase { #region DLL imports diff --git a/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs b/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs index 16997e906..c1cab3a02 100644 --- a/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +++ b/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -25,7 +25,7 @@ namespace DotZLib #endregion public CircularBuffer(int capacity) - { + { Debug.Assert( capacity > 0 ); _buffer = new byte[capacity]; _capacity = capacity; diff --git a/zlib/contrib/dotzlib/DotZLib/CodecBase.cs b/zlib/contrib/dotzlib/DotZLib/CodecBase.cs index 954db7db0..42e6da3a5 100644 --- a/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +++ b/zlib/contrib/dotzlib/DotZLib/CodecBase.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -19,7 +19,7 @@ namespace DotZLib #region Data members /// - /// Instance of the internal zlib buffer structure that is + /// Instance of the internal zlib buffer structure that is /// passed to all functions in the zlib dll /// internal ZStream _ztream = new ZStream(); @@ -45,7 +45,7 @@ namespace DotZLib #endregion /// - /// Initializes a new instance of the CodeBase class. + /// Initializes a new instance of the CodeBase class. /// public CodecBase() { @@ -77,7 +77,7 @@ namespace DotZLib if (_ztream.total_out > 0) { if (DataAvailable != null) - DataAvailable( _outBuffer, 0, (int)_ztream.total_out); + DataAvailable( _outBuffer, 0, (int)_ztream.total_out); resetOutput(); } } diff --git a/zlib/contrib/dotzlib/DotZLib/Deflater.cs b/zlib/contrib/dotzlib/DotZLib/Deflater.cs index d7b8dccca..c2477925b 100644 --- a/zlib/contrib/dotzlib/DotZLib/Deflater.cs +++ b/zlib/contrib/dotzlib/DotZLib/Deflater.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -56,7 +56,7 @@ namespace DotZLib if (data == null) throw new ArgumentNullException(); if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException(); if ((offset+count) > data.Length) throw new ArgumentException(); - + int total = count; int inputIndex = offset; int err = 0; @@ -86,7 +86,7 @@ namespace DotZLib public override void Finish() { int err; - do + do { err = deflate(ref _ztream, (int)FlushTypes.Finish); OnDataAvailable(); diff --git a/zlib/contrib/dotzlib/DotZLib/DotZLib.cs b/zlib/contrib/dotzlib/DotZLib/DotZLib.cs index 410deb088..be184b4c7 100644 --- a/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +++ b/zlib/contrib/dotzlib/DotZLib/DotZLib.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -19,7 +19,7 @@ namespace DotZLib /// /// Defines constants for the various flush types used with zlib /// - internal enum FlushTypes + internal enum FlushTypes { None, Partial, Sync, Full, Finish, Block } @@ -38,7 +38,7 @@ namespace DotZLib public uint total_out; [MarshalAs(UnmanagedType.LPStr)] - string msg; + string msg; uint state; uint zalloc; @@ -51,7 +51,7 @@ namespace DotZLib } #endregion - + #endregion #region Public enums @@ -63,7 +63,7 @@ namespace DotZLib /// /// The default compression level with a reasonable compromise between compression and speed /// - Default = -1, + Default = -1, /// /// No compression at all. The data are passed straight through. /// @@ -71,7 +71,7 @@ namespace DotZLib /// /// The maximum compression rate available. /// - Best = 9, + Best = 9, /// /// The fastest available compression level. /// @@ -86,7 +86,7 @@ namespace DotZLib public class ZLibException : ApplicationException { /// - /// Initializes a new instance of the class with a specified + /// Initializes a new instance of the class with a specified /// error message and error code /// /// The zlib error code that caused the exception @@ -96,7 +96,7 @@ namespace DotZLib } /// - /// Initializes a new instance of the class with a specified + /// Initializes a new instance of the class with a specified /// error code /// /// The zlib error code that caused the exception @@ -109,7 +109,7 @@ namespace DotZLib #region Interfaces /// - /// Declares methods and properties that enables a running checksum to be calculated + /// Declares methods and properties that enables a running checksum to be calculated /// public interface ChecksumGenerator { @@ -163,7 +163,7 @@ namespace DotZLib /// The byte array containing the processed data /// The index of the first processed byte in data /// The number of processed bytes available - /// On return from this method, the data may be overwritten, so grab it while you can. + /// On return from this method, the data may be overwritten, so grab it while you can. /// You cannot assume that startIndex will be zero. /// public delegate void DataAvailableHandler(byte[] data, int startIndex, int count); diff --git a/zlib/contrib/dotzlib/DotZLib/GZipStream.cs b/zlib/contrib/dotzlib/DotZLib/GZipStream.cs index f861675b5..b161300b1 100644 --- a/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +++ b/zlib/contrib/dotzlib/DotZLib/GZipStream.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -84,7 +84,7 @@ namespace DotZLib return !_isWriting; } } - + /// /// Returns false. @@ -96,7 +96,7 @@ namespace DotZLib return false; } } - + /// /// Returns true if this tsream is writeable, false otherwise /// @@ -108,7 +108,7 @@ namespace DotZLib } } #endregion - + #region Destructor & IDispose stuff /// @@ -137,7 +137,7 @@ namespace DotZLib } } #endregion - + #region Basic reading and writing /// /// Attempts to read a number of bytes from the stream. @@ -244,7 +244,7 @@ namespace DotZLib { throw new NotSupportedException(); } - + /// /// Not suppported. /// @@ -256,7 +256,7 @@ namespace DotZLib { throw new NotSupportedException(); } - + /// /// Flushes the GZipStream. /// @@ -266,7 +266,7 @@ namespace DotZLib { // left empty on purpose } - + /// /// Gets/sets the current position in the GZipStream. Not suppported. /// @@ -283,7 +283,7 @@ namespace DotZLib throw new NotSupportedException(); } } - + /// /// Gets the size of the stream. Not suppported. /// diff --git a/zlib/contrib/dotzlib/DotZLib/Inflater.cs b/zlib/contrib/dotzlib/DotZLib/Inflater.cs index 4e60cda07..8ed5451d6 100644 --- a/zlib/contrib/dotzlib/DotZLib/Inflater.cs +++ b/zlib/contrib/dotzlib/DotZLib/Inflater.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,7 +11,7 @@ using System.Runtime.InteropServices; namespace DotZLib { - + /// /// Implements a data decompressor, using the inflate algorithm in the ZLib dll /// @@ -84,7 +84,7 @@ namespace DotZLib public override void Finish() { int err; - do + do { err = inflate(ref _ztream, (int)FlushTypes.Finish); OnDataAvailable(); diff --git a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs index 8dc00db92..109028841 100644 --- a/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/zlib/contrib/dotzlib/DotZLib/UnitTests.cs @@ -1,7 +1,7 @@ // // © Copyright Henrik Ravn 2004 // -// Use, modification and distribution are subject to the Boost Software License, Version 1.0. +// Use, modification and distribution are subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -156,7 +156,7 @@ namespace DotZLibTests public void Info_Version() { Info info = new Info(); - Assert.AreEqual("1.2.3", Info.Version); + Assert.AreEqual("1.2.7", Info.Version); Assert.AreEqual(32, info.SizeOfUInt); Assert.AreEqual(32, info.SizeOfULong); Assert.AreEqual(32, info.SizeOfPointer); @@ -225,7 +225,7 @@ namespace DotZLibTests [Test] public void Inflate_Expand() - { + { uncompressedData.Clear(); using (Inflater inf = new Inflater()) @@ -271,4 +271,4 @@ namespace DotZLibTests } } -#endif \ No newline at end of file +#endif diff --git a/zlib/contrib/dotzlib/readme.txt b/zlib/contrib/dotzlib/readme.txt index 210f4b001..b2395720d 100644 --- a/zlib/contrib/dotzlib/readme.txt +++ b/zlib/contrib/dotzlib/readme.txt @@ -1,6 +1,6 @@ This directory contains a .Net wrapper class library for the ZLib1.dll -The wrapper includes support for inflating/deflating memory buffers, +The wrapper includes support for inflating/deflating memory buffers, .Net streaming wrappers for the gz streams part of zlib, and wrappers for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples. @@ -26,11 +26,11 @@ Build instructions: 1. Using Visual Studio.Net 2003: Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll) - will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on - you are building the release or debug version of the library. Check + will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on + you are building the release or debug version of the library. Check DotZLib/UnitTests.cs for instructions on how to include unit tests in the build. - + 2. Using NAnt: Open a command prompt with access to the build environment and run nant in the same directory as the DotZLib.build file. @@ -38,15 +38,15 @@ Build instructions: debug={true|false} to toggle between release/debug builds (default=true). nunit={true|false} to include or esclude unit tests (default=true). Also the target clean will remove binaries. - Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release - or ./DotZLib/bin/debug, depending on whether you are building the release + Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release + or ./DotZLib/bin/debug, depending on whether you are building the release or debug version of the library. - Examples: + Examples: nant -D:debug=false -D:nunit=false will build a release mode version of the library without unit tests. nant - will build a debug version of the library with unit tests + will build a debug version of the library with unit tests nant clean will remove all previously built files. @@ -54,5 +54,5 @@ Build instructions: --------------------------------- Copyright (c) Henrik Ravn 2004 -Use, modification and distribution are subject to the Boost Software License, Version 1.0. +Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -- cgit v1.2.3