Skip to content

Commit 4f2d664

Browse files
committed
Merge pull request #115 from McNeight/master
Merge MIT License changes
2 parents 875f335 + c9454d5 commit 4f2d664

79 files changed

Lines changed: 1192 additions & 4774 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/COPYING.txt

Lines changed: 0 additions & 340 deletions
This file was deleted.

GlobalAssemblyInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// associated with an assembly.
77
[assembly: AssemblyCompany("ICSharpCode")]
88
[assembly: AssemblyProduct("SharpZipLib (#ziplib)")]
9-
[assembly: AssemblyCopyright("Copyright © 2000-2016 AlphaSierraPapa for the SharpZipLib Team")]
9+
[assembly: AssemblyCopyright("Copyright © 2000-2016 SharpZipLib Contributors")]
1010
[assembly: AssemblyTrademark("")]
1111

1212
#if DEBUG
@@ -38,11 +38,11 @@
3838
// Revision: the number of two second intervals since midnight in local time; i.e. 31308 = 17:23:36 local time.
3939

4040
// Specifies the version of the assembly being attributed.
41-
[assembly: AssemblyVersion("0.87.*")]
41+
[assembly: AssemblyVersion("1.0.*")]
4242

4343
// Instructs a compiler to use a specific version number for the Win32 file version resource.
4444
// The Win32 file version is not required to be the same as the assembly's version number.
45-
[assembly: AssemblyFileVersion("0.87")]
45+
[assembly: AssemblyFileVersion("1.0")]
4646

4747
// Defines additional version information for an assembly manifest.
48-
[assembly: AssemblyInformationalVersion("0.87 Cleanup Build")]
48+
[assembly: AssemblyInformationalVersion("1.0")]

ICSharpCode.SharpZipLib.Tests/Checksum/ChecksumTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public void CRC_32()
5757
exceptionTesting(underTestCrc32);
5858
}
5959

60-
private void exceptionTesting(IChecksum crcUnderTest) {
60+
private void exceptionTesting(IChecksum crcUnderTest)
61+
{
6162

6263
bool exception = false;
6364

ICSharpCode.SharpZipLib.Tests/ICSharpCode.SharpZipLib.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
105105
<Private>True</Private>
106106
</Reference>
107-
<Reference Include="Ploeh.AutoFixture, Version=3.45.1.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
108-
<HintPath>..\packages\AutoFixture.3.45.1\lib\net40\Ploeh.AutoFixture.dll</HintPath>
107+
<Reference Include="Ploeh.AutoFixture, Version=3.46.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
108+
<HintPath>..\packages\AutoFixture.3.46.0\lib\net40\Ploeh.AutoFixture.dll</HintPath>
109109
<Private>True</Private>
110110
</Reference>
111-
<Reference Include="Ploeh.AutoFixture.NUnit3, Version=3.45.1.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
112-
<HintPath>..\packages\AutoFixture.NUnit3.3.45.1\lib\net40\Ploeh.AutoFixture.NUnit3.dll</HintPath>
111+
<Reference Include="Ploeh.AutoFixture.NUnit3, Version=3.46.0.0, Culture=neutral, PublicKeyToken=b24654c590009d4f, processorArchitecture=MSIL">
112+
<HintPath>..\packages\AutoFixture.NUnit3.3.46.0\lib\net40\Ploeh.AutoFixture.NUnit3.dll</HintPath>
113113
<Private>True</Private>
114114
</Reference>
115115
<Reference Include="System" />

ICSharpCode.SharpZipLib.Tests/Lzw/LzwTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System.IO;
2-
using ICSharpCode.SharpZipLib.LZW;
2+
using ICSharpCode.SharpZipLib.Lzw;
33
using ICSharpCode.SharpZipLib.Tests.TestSupport;
44
using NUnit.Framework;
55

6-
namespace ICSharpCode.SharpZipLib.Tests.LZW
6+
namespace ICSharpCode.SharpZipLib.Tests.Lzw
77
{
88

99
[TestFixture]

ICSharpCode.SharpZipLib.Tests/TestSupport/RingBuffer.cs

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -271,58 +271,47 @@ public int Read(byte[] buffer, int index, int count)
271271
/// <summary>
272272
/// Gets a value indicating wether the buffer is empty or not.
273273
/// </summary>
274-
public bool IsEmpty
275-
{
274+
public bool IsEmpty {
276275
get { return count_ == 0; }
277276
}
278277

279-
public bool IsFull
280-
{
281-
get
282-
{
278+
public bool IsFull {
279+
get {
283280
return (count_ == array_.Length);
284281
}
285282
}
286283

287-
public bool IsClosed
288-
{
284+
public bool IsClosed {
289285
get { return isClosed_; }
290286
}
291287

292288
/// <summary>
293289
/// Gets the number of elements in the buffer.
294290
/// </summary>
295-
public int Count
296-
{
297-
get
298-
{
291+
public int Count {
292+
get {
299293
return count_;
300294
}
301295
}
302296

303297

304-
public int Length
305-
{
298+
public int Length {
306299
get { return array_.Length; }
307300
}
308301

309-
public long BytesWritten
310-
{
302+
public long BytesWritten {
311303
get { return bytesWritten_; }
312304
}
313305

314-
public long BytesRead
315-
{
306+
public long BytesRead {
316307
get { return bytesRead_; }
317308
}
318309

319310
/// <summary>
320311
/// Indexer - Get an element from the tail of the RingBuffer.
321312
/// </summary>
322-
public byte this[int index]
323-
{
324-
get
325-
{
313+
public byte this[int index] {
314+
get {
326315
if ((index < 0) || (index >= array_.Length)) {
327316
throw new ArgumentOutOfRangeException(nameof(index));
328317
}

ICSharpCode.SharpZipLib.Tests/TestSupport/Streams.cs

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ public override void Close()
7272
/// Gets a value indicating whether this instance is closed.
7373
/// </summary>
7474
/// <value><c>true</c> if this instance is closed; otherwise, <c>false</c>.</value>
75-
public bool IsClosed
76-
{
75+
public bool IsClosed {
7776
get { return isClosed_; }
7877
}
7978

@@ -83,8 +82,7 @@ public bool IsClosed
8382
/// <value>
8483
/// <c>true</c> if this instance is disposed; otherwise, <c>false</c>.
8584
/// </value>
86-
public bool IsDisposed
87-
{
85+
public bool IsDisposed {
8886
get { return isDisposed_; }
8987
}
9088

@@ -105,10 +103,8 @@ public class MemoryStreamWithoutSeek : TrackedMemoryStream
105103
/// </summary>
106104
/// <value></value>
107105
/// <returns>true if the stream is open.</returns>
108-
public override bool CanSeek
109-
{
110-
get
111-
{
106+
public override bool CanSeek {
107+
get {
112108
return false;
113109
}
114110
}
@@ -124,8 +120,7 @@ public class NullStream : Stream
124120
/// </summary>
125121
/// <value></value>
126122
/// <returns>true if the stream supports reading; otherwise, false.</returns>
127-
public override bool CanRead
128-
{
123+
public override bool CanRead {
129124
get { return false; }
130125
}
131126

@@ -134,8 +129,7 @@ public override bool CanRead
134129
/// </summary>
135130
/// <value></value>
136131
/// <returns>true if the stream supports seeking; otherwise, false.</returns>
137-
public override bool CanSeek
138-
{
132+
public override bool CanSeek {
139133
get { return false; }
140134
}
141135

@@ -144,8 +138,7 @@ public override bool CanSeek
144138
/// </summary>
145139
/// <value></value>
146140
/// <returns>true if the stream supports writing; otherwise, false.</returns>
147-
public override bool CanWrite
148-
{
141+
public override bool CanWrite {
149142
get { return true; }
150143
}
151144

@@ -165,8 +158,7 @@ public override void Flush()
165158
/// <returns>A long value representing the length of the stream in bytes.</returns>
166159
/// <exception cref="T:System.NotSupportedException">A class derived from Stream does not support seeking. </exception>
167160
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
168-
public override long Length
169-
{
161+
public override long Length {
170162
get { throw new Exception("The method or operation is not implemented."); }
171163
}
172164

@@ -178,14 +170,11 @@ public override long Length
178170
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
179171
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking. </exception>
180172
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
181-
public override long Position
182-
{
183-
get
184-
{
173+
public override long Position {
174+
get {
185175
throw new Exception("The method or operation is not implemented.");
186176
}
187-
set
188-
{
177+
set {
189178
throw new Exception("The method or operation is not implemented.");
190179
}
191180
}
@@ -281,8 +270,7 @@ public WindowedStream(int size)
281270
/// </summary>
282271
/// <value></value>
283272
/// <returns>true if the stream supports reading; otherwise, false.</returns>
284-
public override bool CanRead
285-
{
273+
public override bool CanRead {
286274
get { return true; }
287275
}
288276

@@ -291,8 +279,7 @@ public override bool CanRead
291279
/// </summary>
292280
/// <value></value>
293281
/// <returns>true if the stream supports seeking; otherwise, false.</returns>
294-
public override bool CanSeek
295-
{
282+
public override bool CanSeek {
296283
get { return false; }
297284
}
298285

@@ -301,8 +288,7 @@ public override bool CanSeek
301288
/// </summary>
302289
/// <value></value>
303290
/// <returns>true if the stream supports writing; otherwise, false.</returns>
304-
public override bool CanWrite
305-
{
291+
public override bool CanWrite {
306292
get { return true; }
307293
}
308294

@@ -322,8 +308,7 @@ public override void Flush()
322308
/// <returns>A long value representing the length of the stream in bytes.</returns>
323309
/// <exception cref="T:System.NotSupportedException">A class derived from Stream does not support seeking. </exception>
324310
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
325-
public override long Length
326-
{
311+
public override long Length {
327312
// A bit of a HAK as its not true in the stream sense.
328313
get { return ringBuffer_.Count; }
329314
}
@@ -336,14 +321,11 @@ public override long Length
336321
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
337322
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking. </exception>
338323
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
339-
public override long Position
340-
{
341-
get
342-
{
324+
public override long Position {
325+
get {
343326
throw new Exception("The method or operation is not implemented.");
344327
}
345-
set
346-
{
328+
set {
347329
throw new Exception("The method or operation is not implemented.");
348330
}
349331
}
@@ -436,8 +418,7 @@ public override void Write(byte[] buffer, int offset, int count)
436418
/// Gets a value indicating whether this instance is closed.
437419
/// </summary>
438420
/// <value><c>true</c> if this instance is closed; otherwise, <c>false</c>.</value>
439-
public bool IsClosed
440-
{
421+
public bool IsClosed {
441422
get { return ringBuffer_.IsClosed; }
442423
}
443424

@@ -453,17 +434,15 @@ public override void Close()
453434
/// Gets the bytes written.
454435
/// </summary>
455436
/// <value>The bytes written.</value>
456-
public long BytesWritten
457-
{
437+
public long BytesWritten {
458438
get { return ringBuffer_.BytesWritten; }
459439
}
460440

461441
/// <summary>
462442
/// Gets the bytes read.
463443
/// </summary>
464444
/// <value>The bytes read.</value>
465-
public long BytesRead
466-
{
445+
public long BytesRead {
467446
get { return ringBuffer_.BytesRead; }
468447
}
469448

ICSharpCode.SharpZipLib.Tests/Zip/ZipTests.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,43 +54,35 @@ public RuntimeInfo(string password, bool isDirectory)
5454
original = new byte[0];
5555
}
5656

57-
public byte[] Original
58-
{
57+
public byte[] Original {
5958
get { return original; }
6059
}
6160

62-
public CompressionMethod Method
63-
{
61+
public CompressionMethod Method {
6462
get { return method; }
6563
}
6664

67-
public int CompressionLevel
68-
{
65+
public int CompressionLevel {
6966
get { return compressionLevel; }
7067
}
7168

72-
public int Size
73-
{
69+
public int Size {
7470
get { return size; }
7571
}
7672

77-
public string Password
78-
{
73+
public string Password {
7974
get { return password; }
8075
}
8176

82-
bool Random
83-
{
77+
bool Random {
8478
get { return random; }
8579
}
8680

87-
public long Crc
88-
{
81+
public long Crc {
8982
get { return crc; }
9083
}
9184

92-
public bool IsDirectory
93-
{
85+
public bool IsDirectory {
9486
get { return isDirectory_; }
9587
}
9688

ICSharpCode.SharpZipLib.Tests/packages.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="AutoFixture" version="3.45.1" targetFramework="net45" />
4-
<package id="AutoFixture.NUnit3" version="3.45.1" targetFramework="net45" />
3+
<package id="AutoFixture" version="3.46.0" targetFramework="net45" />
4+
<package id="AutoFixture.NUnit3" version="3.46.0" targetFramework="net45" />
5+
<package id="coveralls.io" version="1.3.4" targetFramework="net45" />
56
<package id="NUnit" version="3.2.1" targetFramework="net45" />
67
<package id="NUnit.Console" version="3.2.1" targetFramework="net45" />
78
<package id="NUnit.ConsoleRunner" version="3.2.1" targetFramework="net45" />

0 commit comments

Comments
 (0)