From 60087ad7f2efbcf73acb94bccf84e1142c04344c Mon Sep 17 00:00:00 2001 From: John Reilly Date: Fri, 7 Sep 2007 00:15:35 +0000 Subject: [PATCH] Add missing summary comments in many places. --- src/BZip2/BZip2InputStream.cs | 1 + src/BZip2/BZip2OutputStream.cs | 15 ++++++++++ src/Encryption/PkzipClassic.cs | 9 +++--- src/Tar/TarBuffer.cs | 15 +++++++--- src/Tar/TarEntry.cs | 13 ++++---- src/Tar/TarHeader.cs | 11 +++---- src/Tar/TarInputStream.cs | 18 ++++++++--- src/Tar/TarOutputStream.cs | 15 ++++++++-- src/Zip/Compression/DeflaterEngine.cs | 8 ++++- src/Zip/Compression/PendingBuffer.cs | 13 +++----- .../Streams/DeflaterOutputStream.cs | 15 ++++++++-- src/Zip/FastZip.cs | 4 ++- src/Zip/ZipEntry.cs | 10 +++++-- src/Zip/ZipFile.cs | 30 ++++++++++++++----- src/Zip/ZipInputStream.cs | 10 ++++--- src/Zip/ZipOutputStream.cs | 18 +++++------ 16 files changed, 142 insertions(+), 63 deletions(-) diff --git a/src/BZip2/BZip2InputStream.cs b/src/BZip2/BZip2InputStream.cs index ee5acf1b4..325ddd7af 100644 --- a/src/BZip2/BZip2InputStream.cs +++ b/src/BZip2/BZip2InputStream.cs @@ -157,6 +157,7 @@ public override void Flush() /// /// A byte offset relative to the parameter. /// A value of type indicating the reference point used to obtain the new position. + /// The new position of the stream. /// Any access public override long Seek(long offset, SeekOrigin origin) { diff --git a/src/BZip2/BZip2OutputStream.cs b/src/BZip2/BZip2OutputStream.cs index 738fc5994..0568f9cba 100644 --- a/src/BZip2/BZip2OutputStream.cs +++ b/src/BZip2/BZip2OutputStream.cs @@ -193,6 +193,9 @@ public override long Position { /// /// Sets the current position of this stream to the given value. /// + /// The point relative to the offset from which to being seeking. + /// The reference point from which to begin seeking. + /// The new position in the stream. public override long Seek(long offset, SeekOrigin origin) { throw new NotSupportedException("BZip2OutputStream Seek not supported"); @@ -201,6 +204,7 @@ public override long Seek(long offset, SeekOrigin origin) /// /// Sets the length of this stream to the given value. /// + /// The new stream length. public override void SetLength(long value) { throw new NotSupportedException("BZip2OutputStream SetLength not supported"); @@ -209,6 +213,7 @@ public override void SetLength(long value) /// /// Read a byte from the stream advancing the position. /// + /// The byte read cast to an int; -1 if end of stream. public override int ReadByte() { throw new NotSupportedException("BZip2OutputStream ReadByte not supported"); @@ -217,6 +222,12 @@ public override int ReadByte() /// /// Read a block of bytes /// + /// The buffer to read into. + /// The offset in the buffer to start storing data at. + /// The maximum number of bytes to read. + /// The total number of bytes read. This might be less than the number of bytes + /// requested if that number of bytes are not currently available, or zero + /// if the end of the stream is reached. public override int Read(byte[] buffer, int offset, int count) { throw new NotSupportedException("BZip2OutputStream Read not supported"); @@ -225,6 +236,9 @@ public override int Read(byte[] buffer, int offset, int count) /// /// Write a block of bytes to the stream /// + /// The buffer containing data to write. + /// The offset of the first byte to write. + /// The number of bytes to write. public override void Write(byte[] buffer, int offset, int count) { if ( buffer == null ) { @@ -254,6 +268,7 @@ public override void Write(byte[] buffer, int offset, int count) /// /// Write a byte to the stream. /// + /// The byte to write to the stream. public override void WriteByte(byte value) { int b = (256 + value) % 256; diff --git a/src/Encryption/PkzipClassic.cs b/src/Encryption/PkzipClassic.cs index 93a16256e..b27e523f3 100644 --- a/src/Encryption/PkzipClassic.cs +++ b/src/Encryption/PkzipClassic.cs @@ -55,6 +55,7 @@ public abstract class PkzipClassic : SymmetricAlgorithm /// Generates new encryption keys based on given seed /// /// The seed value to initialise keys with. + /// A new key value. static public byte[] GenerateKeys(byte[] seed) { if ( seed == null ) @@ -68,10 +69,10 @@ static public byte[] GenerateKeys(byte[] seed) } uint[] newKeys = new uint[] { - 0x12345678, - 0x23456789, - 0x34567890 - }; + 0x12345678, + 0x23456789, + 0x34567890 + }; for (int i = 0; i < seed.Length; ++i) { diff --git a/src/Tar/TarBuffer.cs b/src/Tar/TarBuffer.cs index 03bde8595..c85ab3120 100644 --- a/src/Tar/TarBuffer.cs +++ b/src/Tar/TarBuffer.cs @@ -103,6 +103,8 @@ or which contains garbage records after a zero block. /// /// Get the record size for this buffer /// + /// The record size in bytes. + /// This is equal to the multiplied by the public int RecordSize { get { @@ -113,6 +115,8 @@ public int RecordSize /// /// Get the TAR Buffer's record size. /// + /// The record size in bytes. + /// This is equal to the multiplied by the [Obsolete("Use RecordSize property instead")] public int GetRecordSize() { @@ -122,6 +126,7 @@ public int GetRecordSize() /// /// Get the Blocking factor for the buffer /// + /// This is the number of block in each record. public int BlockFactor { get { return blockFactor; @@ -131,6 +136,7 @@ public int BlockFactor { /// /// Get the TAR Buffer's block factor /// + /// The block factor; the number of blocks per record. [Obsolete("Use BlockFactor property instead")] public int GetBlockFactor() { @@ -148,7 +154,7 @@ protected TarBuffer() /// Create TarBuffer for reading with default BlockFactor /// /// Stream to buffer - /// TarBuffer + /// A new suitable for input. public static TarBuffer CreateInputTarBuffer(Stream inputStream) { if ( inputStream == null ) @@ -164,7 +170,7 @@ public static TarBuffer CreateInputTarBuffer(Stream inputStream) /// /// Stream to buffer /// Blocking factor to apply - /// TarBuffer + /// A new suitable for input. public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockFactor) { if ( inputStream == null ) @@ -193,7 +199,7 @@ public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockFactor /// Construct TarBuffer for writing with default BlockFactor /// /// output stream for buffer - /// TarBuffer + /// A new suitable for output. public static TarBuffer CreateOutputTarBuffer(Stream outputStream) { if ( outputStream == null ) @@ -209,7 +215,7 @@ public static TarBuffer CreateOutputTarBuffer(Stream outputStream) /// /// Output stream to write to. /// Blocking factor to apply - /// TarBuffer + /// A new suitable for output. public static TarBuffer CreateOutputTarBuffer(Stream outputStream, int blockFactor) { if ( outputStream == null ) @@ -263,6 +269,7 @@ void Initialize(int blockFactor) /// and also partial records /// /// The data block to check. + /// Returns true if the block is an EOF block; false otherwise. public bool IsEOFBlock(byte[] block) { if ( block == null ) { diff --git a/src/Tar/TarEntry.cs b/src/Tar/TarEntry.cs index 76e251407..d33b2f465 100644 --- a/src/Tar/TarEntry.cs +++ b/src/Tar/TarEntry.cs @@ -124,6 +124,8 @@ public object Clone() /// Construct an entry with only a name. /// This allows the programmer to construct the entry's header "by hand". /// + /// The name to use for the entry + /// Returns the newly created public static TarEntry CreateTarEntry(string name) { TarEntry entry = new TarEntry(); @@ -135,9 +137,8 @@ public static TarEntry CreateTarEntry(string name) /// Construct an entry for a file. File is set to file, and the /// header is constructed from information from the file. /// - /// - /// The file that the entry represents. - /// + /// The file name that the entry represents. + /// Returns the newly created public static TarEntry CreateEntryFromFile(string fileName) { TarEntry entry = new TarEntry(); @@ -149,8 +150,9 @@ public static TarEntry CreateEntryFromFile(string fileName) /// Determine if the two entries are equal. Equality is determined /// by the header names being equal. /// + /// The to compare with the current Object. /// - /// True if the entries are equal. + /// True if the entries are equal; false if not. /// public override bool Equals(object obj) { @@ -164,8 +166,9 @@ public override bool Equals(object obj) } /// - /// Must be overridden when you override Equals. + /// Derive a Hash value for the current /// + /// A Hash code for the current public override int GetHashCode() { return Name.GetHashCode(); diff --git a/src/Tar/TarHeader.cs b/src/Tar/TarHeader.cs index 9cde7bffe..a957ece19 100644 --- a/src/Tar/TarHeader.cs +++ b/src/Tar/TarHeader.cs @@ -36,7 +36,7 @@ /* The tar format and its POSIX successor PAX have a long history which makes for compatability issues when creating and reading files. - + This is further complicated by a large number of programs with variations on formats One common issue is the handling of names longer than 100 characters. GNU style long names are currently supported. @@ -547,8 +547,9 @@ public int DevMinor #region ICloneable Members /// - /// Clone a TAR header. + /// Create a new that is a copy of the current instance. /// + /// A new that is a copy of the current instance. public object Clone() { return this.MemberwiseClone(); @@ -963,10 +964,10 @@ public static int GetAsciiBytes(string toAdd, int nameOffset, byte[] buffer, int } for (int i = 0 ; i < length && nameOffset + i < toAdd.Length; ++i) - { + { buffer[bufferOffset + i] = (byte)toAdd[nameOffset + i]; - } - return bufferOffset + length; + } + return bufferOffset + length; } /// diff --git a/src/Tar/TarInputStream.cs b/src/Tar/TarInputStream.cs index f1ffbdaee..9e09868a7 100644 --- a/src/Tar/TarInputStream.cs +++ b/src/Tar/TarInputStream.cs @@ -136,6 +136,9 @@ public override void Flush() /// /// Set the streams position. This operation is not supported and will throw a NotSupportedException /// + /// The offset relative to the origin to seek to. + /// The to start seeking from. + /// The new position in the stream. /// Any access public override long Seek(long offset, SeekOrigin origin) { @@ -146,6 +149,7 @@ public override long Seek(long offset, SeekOrigin origin) /// Sets the length of the stream /// This operation is not supported and will throw a NotSupportedException /// + /// The new stream length. /// Any access public override void SetLength(long value) { @@ -156,6 +160,9 @@ public override void SetLength(long value) /// Writes a block of bytes to this stream using data from a buffer. /// This operation is not supported and will throw a NotSupportedException /// + /// The buffer containing bytes to write. + /// The offset in the buffer of the frist byte to write. + /// The number of bytes to write. /// Any access public override void Write(byte[] buffer, int offset, int count) { @@ -166,6 +173,7 @@ public override void Write(byte[] buffer, int offset, int count) /// Writes a byte to the current position in the file stream. /// This operation is not supported and will throw a NotSupportedException /// + /// The byte value to write. /// Any access public override void WriteByte(byte value) { @@ -173,8 +181,8 @@ public override void WriteByte(byte value) } /// /// Reads a byte from the current tar archive entry. - /// This method simply calls Read(byte[], int, int). /// + /// A byte cast to an int; -1 if the at the end of the stream. public override int ReadByte() { byte[] oneByteBuffer = new byte[1]; @@ -473,8 +481,8 @@ public TarEntry GetNextEntry() SkipToNextEntry(); headerBuf = this.buffer.ReadBlock(); } else if (header.TypeFlag != TarHeader.LF_NORMAL && - header.TypeFlag != TarHeader.LF_OLDNORM && - header.TypeFlag != TarHeader.LF_DIR) { + header.TypeFlag != TarHeader.LF_OLDNORM && + header.TypeFlag != TarHeader.LF_DIR) { // Ignore things we dont understand completely for now SkipToNextEntry(); headerBuf = this.buffer.ReadBlock(); @@ -588,6 +596,7 @@ public class EntryFactoryAdapter : IEntryFactory /// Create a based on named /// /// The name to use for the entry + /// A new public TarEntry CreateEntry(string name) { return TarEntry.CreateTarEntry(name); @@ -597,6 +606,7 @@ public TarEntry CreateEntry(string name) /// Create a tar entry with details obtained from file /// /// The name of the file to retrieve details from. + /// A new public TarEntry CreateEntryFromFile(string fileName) { return TarEntry.CreateEntryFromFile(fileName); @@ -606,13 +616,13 @@ public TarEntry CreateEntryFromFile(string fileName) /// Create an entry based on details in header /// /// The buffer containing entry details. + /// A new public TarEntry CreateEntry(byte[] headerBuffer) { return new TarEntry(headerBuffer); } } - #region Instance Fields /// /// Flag set when last block has been read diff --git a/src/Tar/TarOutputStream.cs b/src/Tar/TarOutputStream.cs index 79b728ac0..432b12378 100644 --- a/src/Tar/TarOutputStream.cs +++ b/src/Tar/TarOutputStream.cs @@ -141,14 +141,18 @@ public override long Position /// /// set the position within the current stream /// + /// The offset relative to the to seek to + /// The to seek from. + /// The new position in the stream. public override long Seek(long offset, SeekOrigin origin) { return outputStream.Seek(offset, origin); } /// - /// set the length of the current stream + /// Set the length of the current stream /// + /// The new stream length. public override void SetLength(long value) { outputStream.SetLength(value); @@ -168,7 +172,12 @@ public override int ReadByte() /// read bytes from the current stream and advance the position within the /// stream by the number of bytes read. /// - /// The total number of bytes read, or zero if at the end of the stream + /// The buffer to store read bytes in. + /// The index into the buffer to being storing bytes at. + /// The desired number of bytes to read. + /// The total number of bytes read, or zero if at the end of the stream. + /// The number of bytes may be less than the count + /// requested if data is not avialable. public override int Read(byte[] buffer, int offset, int count) { return outputStream.Read(buffer, offset, count); @@ -313,7 +322,7 @@ public void CloseEntry() if (currBytes < currSize) { string errorText = string.Format( "Entry closed at '{0}' before the '{1}' bytes specified in the header were written", - currBytes, currSize); + currBytes, currSize); throw new TarException(errorText); } } diff --git a/src/Zip/Compression/DeflaterEngine.cs b/src/Zip/Compression/DeflaterEngine.cs index ee9422e1c..d793195f5 100644 --- a/src/Zip/Compression/DeflaterEngine.cs +++ b/src/Zip/Compression/DeflaterEngine.cs @@ -120,6 +120,8 @@ public DeflaterEngine(DeflaterPending pending) /// /// Deflate drives actual compression of data /// + /// True to flush input buffers + /// Finish deflation with the current input. /// Returns true if progress has been made. public bool Deflate(bool flush, bool finish) { @@ -198,8 +200,9 @@ public void SetInput(byte[] buffer, int offset, int count) } /// - /// Return true if input is needed via SetInput + /// Determines if more input is needed. /// + /// Return true if input is needed via SetInput public bool NeedsInput() { return (inputEnd == inputOff); @@ -208,6 +211,9 @@ public bool NeedsInput() /// /// Set compression dictionary /// + /// The buffer containing the dictionary data + /// The offset in the buffer for the first byte of data + /// The length of the dictionary data. public void SetDictionary(byte[] buffer, int offset, int length) { #if DebugDeflation diff --git a/src/Zip/Compression/PendingBuffer.cs b/src/Zip/Compression/PendingBuffer.cs index df3cf1adf..d20584524 100644 --- a/src/Zip/Compression/PendingBuffer.cs +++ b/src/Zip/Compression/PendingBuffer.cs @@ -252,15 +252,10 @@ public bool IsFlushed { /// Flushes the pending buffer into the given output array. If the /// output array is to small, only a partial flush is done. /// - /// - /// The output array. - /// - /// - /// The offset into output array. - /// - /// - /// The maximum number of bytes to store. - /// + /// The output array. + /// The offset into output array. + /// The maximum number of bytes to store. + /// The number of bytes flushed. public int Flush(byte[] output, int offset, int length) { if (bitCount >= 8) { diff --git a/src/Zip/Compression/Streams/DeflaterOutputStream.cs b/src/Zip/Compression/Streams/DeflaterOutputStream.cs index 3bfb68a1f..5c0ccbf03 100644 --- a/src/Zip/Compression/Streams/DeflaterOutputStream.cs +++ b/src/Zip/Compression/Streams/DeflaterOutputStream.cs @@ -249,6 +249,7 @@ protected void EncryptBlock(byte[] buffer, int offset, int length) /// /// Initializes encryption keys based on given password /// + /// The password. protected void InitializePassword(string password) { #if NETCF_1_0 keys = new uint[] { @@ -388,6 +389,9 @@ public override long Position { /// /// Sets the current position of this stream to the given value. Not supported by this class! /// + /// The offset relative to the to seek. + /// The to seek from. + /// The new position in the stream. /// Any access public override long Seek(long offset, SeekOrigin origin) { @@ -397,6 +401,7 @@ public override long Seek(long offset, SeekOrigin origin) /// /// Sets the length of this stream to the given value. Not supported by this class! /// + /// The new stream length. /// Any access public override void SetLength(long value) { @@ -406,6 +411,7 @@ public override void SetLength(long value) /// /// Read a byte from stream advancing position by one /// + /// The byte read cast to an int. THe value is -1 if at the end of the stream. /// Any access public override int ReadByte() { @@ -415,6 +421,10 @@ public override int ReadByte() /// /// Read a block of bytes from stream /// + /// The buffer to store read data in. + /// The offset to start storing at. + /// The maximum number of bytes to read. + /// The actual number of bytes read. Zero if end of stream is detected. /// Any access public override int Read(byte[] buffer, int offset, int count) { @@ -452,9 +462,8 @@ public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, As } /// - /// Flushes the stream by calling flush() on the deflater and then - /// on the underlying stream. This ensures that all bytes are - /// flushed. + /// Flushes the stream by calling Flush on the deflater and then + /// on the underlying stream. This ensures that all bytes are flushed. /// public override void Flush() { diff --git a/src/Zip/FastZip.cs b/src/Zip/FastZip.cs index b686dc62c..8ecf3cc0d 100644 --- a/src/Zip/FastZip.cs +++ b/src/Zip/FastZip.cs @@ -144,7 +144,8 @@ public bool OnCompletedFile(string file) /// Fires the process directory delegate. /// /// The directory being processed. - /// Flag indicating if directory has matching files as determined by the current filter. + /// Flag indicating if the directory has matching files as determined by the current filter. + /// A of true if the operation should continue; false otherwise. public bool OnProcessDirectory(string directory, bool hasMatchingFiles) { bool result = true; @@ -159,6 +160,7 @@ public bool OnProcessDirectory(string directory, bool hasMatchingFiles) /// /// The minimum timespan between events. /// + /// The minimum period of time between events. /// public TimeSpan ProgressInterval { diff --git a/src/Zip/ZipEntry.cs b/src/Zip/ZipEntry.cs index a4137d88a..d3836d0cf 100644 --- a/src/Zip/ZipEntry.cs +++ b/src/Zip/ZipEntry.cs @@ -606,7 +606,7 @@ public void ForceZip64() /// /// Get a value indicating wether Zip64 extensions were forced. /// - /// + /// A value of true if Zip64 extensions have been forced on; false if not. public bool IsZip64Forced() { return forceZip64_; @@ -616,6 +616,7 @@ public bool IsZip64Forced() /// Gets a value indicating if the entry requires Zip64 extensions /// to store the full entry values. /// + /// A value of true if a local header requires Zip64 extensions; false if not. public bool LocalHeaderRequiresZip64 { get { @@ -1027,6 +1028,7 @@ public bool IsCompressionMethodSupported() /// /// Creates a copy of this zip entry. /// + /// An that is a copy of the current instance. public object Clone() { ZipEntry result = (ZipEntry)this.MemberwiseClone(); @@ -1043,8 +1045,9 @@ public object Clone() #endregion /// - /// Gets the string representation of this ZipEntry. + /// Gets a string representation of this ZipEntry. /// + /// A readable textual representation of this public override string ToString() { return name; @@ -1070,7 +1073,8 @@ public static bool IsCompressionMethodSupported(CompressionMethod method) /// Names are made relative by trimming leading slashes which is compatible /// with the ZIP naming convention. /// - /// Name to clean + /// The name to clean + /// The 'cleaned' name. /// /// The Zip name transform class is more flexible. /// diff --git a/src/Zip/ZipFile.cs b/src/Zip/ZipFile.cs index a8ca4c386..9ce2140f8 100644 --- a/src/Zip/ZipFile.cs +++ b/src/Zip/ZipFile.cs @@ -430,6 +430,7 @@ public ZipFile(string name) /// /// Opens a Zip file reading the given . /// + /// The to read archive data from. /// /// An i/o error occurs. /// @@ -462,6 +463,7 @@ public ZipFile(FileStream file) /// /// Opens a Zip file reading the given . /// + /// The to read archive data from. /// /// An i/o error occurs /// @@ -675,8 +677,9 @@ public ZipEntry this[int index] #region Input Handling /// - /// Returns an enumerator for the Zip entries in this Zip file. + /// Gets an enumerator for the Zip entries in this Zip file. /// + /// Returns an for this archive. /// /// The Zip file has been closed. /// @@ -737,13 +740,11 @@ public ZipEntry GetEntry(string name) } /// - /// Creates an input stream reading the given zip entry as - /// uncompressed data. Normally zip entry should be an entry - /// returned by GetEntry(). + /// Gets an input stream for reading the given zip entry data in an uncompressed form. + /// Normally the should be an entry returned by GetEntry(). /// - /// - /// the input stream. - /// + /// The to obtain a data for + /// An input containing data for this /// /// The ZipFile has already been closed /// @@ -778,7 +779,7 @@ public Stream GetInputStream(ZipEntry entry) /// /// The index of the entry to obtain an input stream for. /// - /// An input stream. + /// An input containing data for this /// /// /// The ZipFile has already been closed @@ -3768,6 +3769,7 @@ public BaseArchiveStorage(FileUpdateMode updateMode) /// /// Return a stream suitable for performing direct updates on the original source. /// + /// The to open for direct update. /// Returns a stream suitable for direct updating. public abstract Stream OpenForDirectUpdate(Stream stream); @@ -3788,6 +3790,7 @@ public FileUpdateMode UpdateMode } #endregion + #region Instance Fields FileUpdateMode updateMode_; #endregion @@ -3823,6 +3826,7 @@ public DiskArchiveStorage(ZipFile file) { } #endregion + #region IArchiveStorage Members /// @@ -3906,7 +3910,9 @@ public override Stream MakeTemporaryCopy(Stream stream) /// /// Return a stream suitable for performing direct updates on the original source. /// + /// The current stream. /// Returns a stream suitable for direct updating. + /// If the stream is not null this is used as is. public override Stream OpenForDirectUpdate(Stream current) { Stream result; @@ -3939,6 +3945,7 @@ public override void Dispose() } #endregion + #region Internal routines string GetTempFileName(string original, bool makeTempFile) { @@ -3975,6 +3982,7 @@ string GetTempFileName(string original, bool makeTempFile) return result; } #endregion + #region Instance Fields Stream temporaryStream_; string fileName_; @@ -4007,6 +4015,7 @@ public MemoryArchiveStorage(FileUpdateMode updateMode) } #endregion + #region Properties /// /// Get the stream returned by if this was in fact called. @@ -4017,6 +4026,7 @@ public MemoryStream FinalStream } #endregion + #region IArchiveStorage Members /// @@ -4060,7 +4070,10 @@ public override Stream MakeTemporaryCopy(Stream stream) /// /// Return a stream suitable for performing direct updates on the original source. /// + /// The original source stream /// Returns a stream suitable for direct updating. + /// If the passed is not null this is used; + /// otherwise a new is returned. public override Stream OpenForDirectUpdate(Stream stream) { Stream result; @@ -4093,6 +4106,7 @@ public override void Dispose() } #endregion + #region Instance Fields MemoryStream temporaryStream_; MemoryStream finalStream_; diff --git a/src/Zip/ZipInputStream.cs b/src/Zip/ZipInputStream.cs index fdab4a4b9..ac350216d 100644 --- a/src/Zip/ZipInputStream.cs +++ b/src/Zip/ZipInputStream.cs @@ -121,6 +121,7 @@ public class ZipInputStream : InflaterInputStream /// /// Creates a new Zip input stream, for reading a zip archive. /// + /// The underlying providing data. public ZipInputStream(Stream baseInputStream) : base(baseInputStream, new Inflater(true)) { @@ -131,6 +132,7 @@ public ZipInputStream(Stream baseInputStream) /// /// Optional password used for encryption when non-null /// + /// A password for all encrypted entries in this public string Password { get { @@ -143,7 +145,7 @@ public string Password /// - /// Gets a value indicating if there is a current entry and it can be decompressed + /// Gets a value indicating if there is a current entry and it can be decompressed /// /// /// The entry can only be decompressed if the library supports the zip features required to extract it. @@ -184,10 +186,10 @@ public ZipEntry GetNextEntry() int header = inputBuffer.ReadLeInt(); if (header == ZipConstants.CentralHeaderSignature || - header == ZipConstants.EndOfCentralDirectorySignature || - header == ZipConstants.CentralHeaderDigitalSignature || + header == ZipConstants.EndOfCentralDirectorySignature || + header == ZipConstants.CentralHeaderDigitalSignature || header == ZipConstants.ArchiveExtraDataSignature || - header == ZipConstants.Zip64CentralFileHeaderSignature) { + header == ZipConstants.Zip64CentralFileHeaderSignature) { // No more individual entries exist Close(); return null; diff --git a/src/Zip/ZipOutputStream.cs b/src/Zip/ZipOutputStream.cs index 3181844d5..8c592151c 100644 --- a/src/Zip/ZipOutputStream.cs +++ b/src/Zip/ZipOutputStream.cs @@ -107,9 +107,9 @@ public ZipOutputStream(Stream baseOutputStream) #endregion /// - /// Gets boolean indicating central header has been added for this archive... - /// No further entries can be added once this has been done. + /// Gets a flag value of true if the central header has been added for this archive; false if it has not been added. /// + /// No further entries can be added once this has been done. public bool IsFinished { get { @@ -137,9 +137,10 @@ public void SetComment(string comment) } /// - /// Sets default compression level. The new level will be activated + /// Sets the compression level. The new level will be activated /// immediately. /// + /// The new compression level (1 to 9). /// /// Level specified is not supported. /// @@ -543,12 +544,11 @@ void WriteEncryptionHeader(long crcValue) /// /// Writes the given buffer to the current entry. /// - /// - /// Archive size is invalid - /// - /// - /// No entry is active. - /// + /// The buffer containing data to write. + /// The offset of the first byte to write. + /// The number of bytes to write. + /// Archive size is invalid + /// No entry is active. public override void Write(byte[] buffer, int offset, int count) { if (curEntry == null) {