[ZipFile, ZipFileEntry] Add regions for sanity

This commit is contained in:
Matt Nadareski
2016-09-16 21:05:23 -07:00
parent 87488bea14
commit ba5151c6d8
2 changed files with 45 additions and 9 deletions

View File

@@ -111,6 +111,8 @@ namespace SabreTools.Helper
#endregion
#region Central Directory
/// <summary>
/// Find the end of the central directory signature
/// </summary>
@@ -227,6 +229,10 @@ namespace SabreTools.Helper
bw.Write(_fileComment, 0, _fileComment.Length);
}
#endregion
#region Zip64 Central Directory
/// <summary>
/// Read the end of the Zip64 central directory
/// </summary>
@@ -361,6 +367,10 @@ namespace SabreTools.Helper
bw.Write((uint)1); // total number of disks
}
#endregion
#region Open, Create, Close
/// <summary>
/// Open a new file as an archive
/// </summary>
@@ -737,6 +747,10 @@ namespace SabreTools.Helper
_zipOpen = ZipOpenType.Closed;
}
#endregion
#region Read and Write
/// <summary>
/// Open the read file stream
/// </summary>
@@ -885,6 +899,10 @@ namespace SabreTools.Helper
_entries[_entries.Count - 1].AddDirectory();
}
#endregion
#region Helpers
/// <summary>
/// Scan every individual entry for validity
/// </summary>
@@ -994,5 +1012,7 @@ namespace SabreTools.Helper
}
}
}
#endregion
}
}