Brought spec up to date, improvements to stability

This commit is contained in:
CloneTrooper1019
2020-07-12 20:19:30 -05:00
parent 7359b6efb7
commit 57fd3f8a25
29 changed files with 551 additions and 245 deletions

View File

@ -6,7 +6,7 @@ namespace RobloxFiles.BinaryFormat.Chunks
{
public Dictionary<string, string> Data = new Dictionary<string, string>();
public void LoadFromReader(BinaryRobloxFileReader reader)
public void Load(BinaryRobloxFileReader reader)
{
BinaryRobloxFile file = reader.File;
int numEntries = reader.ReadInt32();
@ -21,18 +21,15 @@ namespace RobloxFiles.BinaryFormat.Chunks
file.META = this;
}
public BinaryRobloxFileChunk SaveAsChunk(BinaryRobloxFileWriter writer)
public void Save(BinaryRobloxFileWriter writer)
{
writer.StartWritingChunk(this);
writer.Write(Data.Count);
foreach (var kvPair in Data)
foreach (var pair in Data)
{
writer.WriteString(kvPair.Key);
writer.WriteString(kvPair.Value);
writer.WriteString(pair.Key);
writer.WriteString(pair.Value);
}
return writer.FinishWritingChunk();
}
}
}