Skip to content

Commit

Permalink
PR #477: Fix spelling errors in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Numpsy authored Jul 4, 2020
1 parent 7c4f517 commit b5898dc
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Checksum/BZip2Crc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public long Value
{
get
{
// Tehcnically, the output should be:
// Technically, the output should be:
//return (long)(~checkValue ^ crcXor);
// but x ^ 0 = x, so there is no point in adding
// the XOR operation
Expand Down
4 changes: 2 additions & 2 deletions src/ICSharpCode.SharpZipLib/Core/FileSystemScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public string Name
}

/// <summary>
/// Get set a value indicating wether scanning should continue or not.
/// Get set a value indicating whether scanning should continue or not.
/// </summary>
public bool ContinueRunning
{
Expand Down Expand Up @@ -209,7 +209,7 @@ public Exception Exception
}

/// <summary>
/// Get / set a value indicating wether scanning should continue.
/// Get / set a value indicating whether scanning should continue.
/// </summary>
public bool ContinueRunning
{
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Lzw/LzwInputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public override void SetLength(long value)
/// Writes a sequence of bytes to stream and advances the current position
/// This method always throws a NotSupportedException
/// </summary>
/// <param name="buffer">Thew buffer containing data to write.</param>
/// <param name="buffer">The buffer containing data to write.</param>
/// <param name="offset">The offset of the first byte to write.</param>
/// <param name="count">The number of bytes to write.</param>
/// <exception cref="NotSupportedException">Any access</exception>
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected TarArchive()
}

/// <summary>
/// Initalise a TarArchive for input.
/// Initialise a TarArchive for input.
/// </summary>
/// <param name="stream">The <see cref="TarInputStream"/> to use for input.</param>
protected TarArchive(TarInputStream stream)
Expand Down
6 changes: 3 additions & 3 deletions src/ICSharpCode.SharpZipLib/Tar/TarOutputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public override int ReadByte()
/// <param name="count">The desired number of bytes to read.</param>
/// <returns>The total number of bytes read, or zero if at the end of the stream.
/// The number of bytes may be less than the <paramref name="count">count</paramref>
/// requested if data is not avialable.</returns>
/// requested if data is not available.</returns>
public override int Read(byte[] buffer, int offset, int count)
{
return outputStream.Read(buffer, offset, count);
Expand Down Expand Up @@ -250,7 +250,7 @@ public int GetRecordSize()
}

/// <summary>
/// Get a value indicating wether an entry is open, requiring more data to be written.
/// Get a value indicating whether an entry is open, requiring more data to be written.
/// </summary>
private bool IsEntryOpen
{
Expand Down Expand Up @@ -483,7 +483,7 @@ private void WriteEofBlock()
private int assemblyBufferLength;

/// <summary>
/// Flag indicating wether this instance has been closed or not.
/// Flag indicating whether this instance has been closed or not.
/// </summary>
private bool isClosed;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class DeflaterEngine

/// <summary>
/// Construct instance with pending buffer
/// Adler calculation will be peformed
/// Adler calculation will be performed
/// </summary>
/// <param name="pending">
/// Pending buffer to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public override void SetLength(long value)
/// Writes a sequence of bytes to stream and advances the current position
/// This method always throws a NotSupportedException
/// </summary>
/// <param name="buffer">Thew buffer containing data to write.</param>
/// <param name="buffer">The buffer containing data to write.</param>
/// <param name="offset">The offset of the first byte to write.</param>
/// <param name="count">The number of bytes to write.</param>
/// <exception cref="NotSupportedException">Any access</exception>
Expand Down Expand Up @@ -704,7 +704,7 @@ public override int Read(byte[] buffer, int offset, int count)
protected long csize;

/// <summary>
/// Flag indicating wether this instance has been closed or not.
/// Flag indicating whether this instance has been closed or not.
/// </summary>
private bool isClosed;

Expand Down
8 changes: 4 additions & 4 deletions src/ICSharpCode.SharpZipLib/Zip/FastZip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public FastZip(FastZipEvents events)
#region Properties

/// <summary>
/// Get/set a value indicating wether empty directories should be created.
/// Get/set a value indicating whether empty directories should be created.
/// </summary>
public bool CreateEmptyDirectories
{
Expand Down Expand Up @@ -267,7 +267,7 @@ public IEntryFactory EntryFactory
/// read Zip64 archives. However it does avoid the situation were a large file
/// is added and cannot be completed correctly.
/// NOTE: Setting the size for entries before they are added is the best solution!
/// By default the EntryFactory used by FastZip will set fhe file size.
/// By default the EntryFactory used by FastZip will set the file size.
/// </remarks>
public UseZip64 UseZip64
{
Expand All @@ -276,7 +276,7 @@ public UseZip64 UseZip64
}

/// <summary>
/// Get/set a value indicating wether file dates and times should
/// Get/set a value indicating whether file dates and times should
/// be restored when extracting files from an archive.
/// </summary>
/// <remarks>The default value is false.</remarks>
Expand Down Expand Up @@ -533,7 +533,7 @@ private void ProcessFile(object sender, ScanEventArgs e)
{
try
{
// The open below is equivalent to OpenRead which gaurantees that if opened the
// The open below is equivalent to OpenRead which guarantees that if opened the
// file will not be changed by subsequent openers, but precludes opening in some cases
// were it could succeed. ie the open may fail as its already open for writing and the share mode should reflect that.
using (FileStream stream = File.Open(e.Name, FileMode.Open, FileAccess.Read, FileShare.Read))
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/WindowsNameTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public bool AllowParentTraversal
}

/// <summary>
/// Gets or sets a value indicating wether paths on incoming values should be removed.
/// Gets or sets a value indicating whether paths on incoming values should be removed.
/// </summary>
public bool TrimIncomingPaths
{
Expand Down
20 changes: 10 additions & 10 deletions src/ICSharpCode.SharpZipLib/Zip/ZipConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public enum GeneralBitFlags
Method = 0x0006,

/// <summary>
/// Bit 3 if set indicates a trailing data desciptor is appended to the entry data
/// Bit 3 if set indicates a trailing data descriptor is appended to the entry data
/// </summary>
Descriptor = 0x0008,

Expand Down Expand Up @@ -443,12 +443,12 @@ public static class ZipConstants
public const int ArchiveExtraDataSignature = 'P' | ('K' << 8) | (6 << 16) | (7 << 24);

/// <summary>
/// Central header digitial signature
/// Central header digital signature
/// </summary>
public const int CentralHeaderDigitalSignature = 'P' | ('K' << 8) | (5 << 16) | (5 << 24);

/// <summary>
/// Central header digitial signature
/// Central header digital signature
/// </summary>
[Obsolete("Use CentralHeaderDigitalSignaure instead")]
public const int CENDIGITALSIG = 'P' | ('K' << 8) | (5 << 16) | (5 << 24);
Expand All @@ -468,7 +468,7 @@ public static class ZipConstants

/// <summary>
/// Default encoding used for string conversion. 0 gives the default system OEM code page.
/// Using the default code page isnt the full solution neccessarily
/// Using the default code page isnt the full solution necessarily
/// there are many variable factors, codepage 850 is often a good choice for
/// European users, however be careful about compatability.
/// </summary>
Expand All @@ -479,32 +479,32 @@ public static int DefaultCodePage
set => ZipStrings.CodePage = value;
}

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToString(byte[], int)"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToString(byte[], int)"/></summary>
[Obsolete("Use ZipStrings.ConvertToString instead")]
public static string ConvertToString(byte[] data, int count)
=> ZipStrings.ConvertToString(data, count);

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToString(byte[])"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToString(byte[])"/></summary>
[Obsolete("Use ZipStrings.ConvertToString instead")]
public static string ConvertToString(byte[] data)
=> ZipStrings.ConvertToString(data);

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToStringExt(int, byte[], int)"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToStringExt(int, byte[], int)"/></summary>
[Obsolete("Use ZipStrings.ConvertToStringExt instead")]
public static string ConvertToStringExt(int flags, byte[] data, int count)
=> ZipStrings.ConvertToStringExt(flags, data, count);

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToStringExt(int, byte[])"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToStringExt(int, byte[])"/></summary>
[Obsolete("Use ZipStrings.ConvertToStringExt instead")]
public static string ConvertToStringExt(int flags, byte[] data)
=> ZipStrings.ConvertToStringExt(flags, data);

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToArray(string)"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToArray(string)"/></summary>
[Obsolete("Use ZipStrings.ConvertToArray instead")]
public static byte[] ConvertToArray(string str)
=> ZipStrings.ConvertToArray(str);

/// <summary> Depracated wrapper for <see cref="ZipStrings.ConvertToArray(int, string)"/></summary>
/// <summary> Deprecated wrapper for <see cref="ZipStrings.ConvertToArray(int, string)"/></summary>
[Obsolete("Use ZipStrings.ConvertToArray instead")]
public static byte[] ConvertToArray(int flags, string str)
=> ZipStrings.ConvertToArray(flags, str);
Expand Down
14 changes: 7 additions & 7 deletions src/ICSharpCode.SharpZipLib/Zip/ZipEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public ZipEntry(ZipEntry entry)
#endregion Constructors

/// <summary>
/// Get a value indicating wether the entry has a CRC value available.
/// Get a value indicating whether the entry has a CRC value available.
/// </summary>
public bool HasCrc
{
Expand Down Expand Up @@ -296,7 +296,7 @@ public bool IsCrypted
}

/// <summary>
/// Get / set a flag indicating wether entry name and comment text are
/// Get / set a flag indicating whether entry name and comment text are
/// encoded in <a href="http://www.unicode.org">unicode UTF8</a>.
/// </summary>
/// <remarks>This is an assistant that interprets the <see cref="Flags">flags</see> property.</remarks>
Expand Down Expand Up @@ -606,7 +606,7 @@ public int Version
/// Get a value indicating whether this entry can be decompressed by the library.
/// </summary>
/// <remarks>This is based on the <see cref="Version"></see> and
/// wether the <see cref="IsCompressionMethodSupported()">compression method</see> is supported.</remarks>
/// whether the <see cref="IsCompressionMethodSupported()">compression method</see> is supported.</remarks>
public bool CanDecompress
{
get
Expand All @@ -630,7 +630,7 @@ public void ForceZip64()
}

/// <summary>
/// Get a value indicating wether Zip64 extensions were forced.
/// Get a value indicating whether Zip64 extensions were forced.
/// </summary>
/// <returns>A <see cref="bool"/> value of true if Zip64 extensions have been forced on; false if not.</returns>
public bool IsZip64Forced()
Expand Down Expand Up @@ -670,7 +670,7 @@ public bool LocalHeaderRequiresZip64
}

/// <summary>
/// Get a value indicating wether the central directory entry requires Zip64 extensions to be stored.
/// Get a value indicating whether the central directory entry requires Zip64 extensions to be stored.
/// </summary>
public bool CentralHeaderRequiresZip64
{
Expand Down Expand Up @@ -901,7 +901,7 @@ public byte[] ExtraData
{
get
{
// TODO: This is slightly safer but less efficient. Think about wether it should change.
// TODO: This is slightly safer but less efficient. Think about whether it should change.
// return (byte[]) extra.Clone();
return extra;
}
Expand Down Expand Up @@ -1059,7 +1059,7 @@ internal void ProcessExtraData(bool localHeader)
// flag 13 is set indicating masking, the value stored for the
// uncompressed size in the Local Header will be zero.
//
// Othewise there is problem with minizip implementation
// Otherwise there is problem with minizip implementation
if (size == uint.MaxValue)
{
size = (ulong)extraData.ReadLong();
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/ZipEntryFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public int SetAttributes
}

/// <summary>
/// Get set a value indicating wether unidoce text should be set on.
/// Get set a value indicating whether unidoce text should be set on.
/// </summary>
public bool IsUnicodeText
{
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Zip/ZipExtraData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace ICSharpCode.SharpZipLib.Zip
{
// TODO: Sort out wether tagged data is useful and what a good implementation might look like.
// TODO: Sort out whether tagged data is useful and what a good implementation might look like.
// Its just a sketch of an idea at the moment.

/// <summary>
Expand Down
16 changes: 8 additions & 8 deletions src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public long BytesTested
}

/// <summary>
/// Get a value indicating wether the last entry test was valid.
/// Get a value indicating whether the last entry test was valid.
/// </summary>
public bool EntryValid
{
Expand Down Expand Up @@ -318,7 +318,7 @@ public class ZipFile : IEnumerable, IDisposable
#region KeyHandling

/// <summary>
/// Delegate for handling keys/password setting during compresion/decompression.
/// Delegate for handling keys/password setting during compression/decompression.
/// </summary>
public delegate void KeysRequiredEventHandler(
object sender,
Expand Down Expand Up @@ -375,7 +375,7 @@ public string Password
}

/// <summary>
/// Get a value indicating wether encryption keys are currently available.
/// Get a value indicating whether encryption keys are currently available.
/// </summary>
private bool HaveKeys
{
Expand Down Expand Up @@ -654,7 +654,7 @@ public bool IsStreamOwner
}

/// <summary>
/// Get a value indicating wether
/// Get a value indicating whether
/// this archive is embedded in another file or not.
/// </summary>
public bool IsEmbeddedArchive
Expand Down Expand Up @@ -2094,7 +2094,7 @@ private void WriteLocalEntryHeader(ZipUpdate update)
break;

case UseZip64.Off:
// Do nothing. The entry itself may be using Zip64 independantly.
// Do nothing. The entry itself may be using Zip64 independently.
break;
}
}
Expand Down Expand Up @@ -3395,7 +3395,7 @@ private void ReadEntries()
//
// The search is limited to 64K which is the maximum size of a trailing comment field to aid speed.
// This should be compatible with both SFX and ZIP files but has only been tested for Zip files
// If a SFX file has the Zip data attached as a resource and there are other resources occuring later then
// If a SFX file has the Zip data attached as a resource and there are other resources occurring later then
// this could be invalid.
// Could also speed this up by reading memory in larger blocks.

Expand Down Expand Up @@ -4381,7 +4381,7 @@ public interface IDynamicDataSource
public class StaticDiskDataSource : IStaticDataSource
{
/// <summary>
/// Initialise a new instnace of <see cref="StaticDiskDataSource"/>
/// Initialise a new instance of <see cref="StaticDiskDataSource"/>
/// </summary>
/// <param name="fileName">The name of the file to obtain data from.</param>
public StaticDiskDataSource(string fileName)
Expand All @@ -4394,7 +4394,7 @@ public StaticDiskDataSource(string fileName)
/// <summary>
/// Get a <see cref="Stream"/> providing data.
/// </summary>
/// <returns>Returns a <see cref="Stream"/> provising data.</returns>
/// <returns>Returns a <see cref="Stream"/> providing data.</returns>
public Stream GetSource()
{
return File.Open(fileName_, FileMode.Open, FileAccess.Read, FileShare.Read);
Expand Down
6 changes: 3 additions & 3 deletions src/ICSharpCode.SharpZipLib/Zip/ZipHelperStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public ZipHelperStream(Stream stream)
#endregion Constructors

/// <summary>
/// Get / set a value indicating wether the the underlying stream is owned or not.
/// Get / set a value indicating whether the the underlying stream is owned or not.
/// </summary>
/// <remarks>If the stream is owned it is closed when this instance is closed.</remarks>
public bool IsStreamOwner
Expand Down Expand Up @@ -303,7 +303,7 @@ private void WriteLocalHeader(ZipEntry entry, EntryPatchData patchData)
/// <param name="endLocation">Location, marking the end of block.</param>
/// <param name="minimumBlockSize">Minimum size of the block.</param>
/// <param name="maximumVariableData">The maximum variable data.</param>
/// <returns>Eeturns the offset of the first byte after the signature; -1 if not found</returns>
/// <returns>Returns the offset of the first byte after the signature; -1 if not found</returns>
public long LocateBlockWithSignature(int signature, long endLocation, int minimumBlockSize, int maximumVariableData)
{
long pos = endLocation - minimumBlockSize;
Expand Down Expand Up @@ -332,7 +332,7 @@ public long LocateBlockWithSignature(int signature, long endLocation, int minimu
/// </summary>
/// <param name="noOfEntries">The number of entries in the central directory.</param>
/// <param name="sizeEntries">The size of entries in the central directory.</param>
/// <param name="centralDirOffset">The offset of the dentral directory.</param>
/// <param name="centralDirOffset">The offset of the central directory.</param>
public void WriteZip64EndOfCentralDirectory(long noOfEntries, long sizeEntries, long centralDirOffset)
{
long centralSignatureOffset = centralDirOffset + sizeEntries;
Expand Down
Loading

0 comments on commit b5898dc

Please sign in to comment.