private void ProcessFileEntry(FileEntry fileEntry) { //Get rid of any streams that will be empty if (fileEntry.Filesize == 0) { fileEntry.Stream?.Dispose(); fileEntry.Stream = null; } //Add to the correct if (fileEntry.IsDeltaFile()) { DeltaFile.Add(fileEntry); return; } if (fileEntry.IsNewFile()) { NewFile.Add(fileEntry); return; } if (fileEntry.DeltaExtension.EndsWith("load")) { LoaderFile = fileEntry; return; } SameFile.Add(fileEntry); }
private void WriteExports() { NewFile.AddRange(EncodingUtil.encoding.GetBytes("EXPORT_DATA")); NewFile.Add(new byte()); foreach (Export export in Exports) { NewFile.AddRange(export.Write()); } }
private void WriteCollectionLink() { NewFile.AddRange(EncodingUtil.encoding.GetBytes("COLLECTION_LINK")); NewFile.Add(new byte()); NewFile.AddRange(BitConverter.GetBytes(0)); UInt32 newCollectionLinkAddress = (UInt32)NewFile.Count + 4 + COLLECTION_LINK_PADDING; NewFile.AddRange(BitConverter.GetBytes(newCollectionLinkAddress)); NewFile.AddRange(new byte[COLLECTION_LINK_PADDING]); }