internal void RemoveFileBlock(string fileName) { this._dirtyFlag = true; this.CentralDirectoryDictionary.Remove(fileName); if (this.CentralDirectoryDictionary.Count == 0) { this._centralDirectoryDigitalSignature = null; } }
private void ParseRecord(BinaryReader reader, long centralDirectoryOffset, int centralDirectoryCount, long expectedCentralDirectorySize) { if (centralDirectoryCount > 0) { SortedList list = new SortedList(centralDirectoryCount); for (int i = 0; i < centralDirectoryCount; i++) { ZipIOCentralDirectoryFileHeader header2 = ZipIOCentralDirectoryFileHeader.ParseRecord(reader, this._blockManager.Encoding); list.Add(header2.OffsetOfLocalHeader, header2); } if ((reader.BaseStream.Position - centralDirectoryOffset) > expectedCentralDirectorySize) { throw new FileFormatException(SR.Get("CorruptedData")); } foreach (ZipIOCentralDirectoryFileHeader header in list.Values) { this.CentralDirectoryDictionary.Add(header.FileName, header); } this._centralDirectoryDigitalSignature = ZipIOCentralDirectoryDigitalSignature.ParseRecord(reader); } this._offset = centralDirectoryOffset; this._dirtyFlag = false; this.Validate(expectedCentralDirectorySize); }