LibHac/libhac/Savefile/Savefile.cs
2018-07-19 18:31:35 -05:00

22 lines
631 B
C#

using System.IO;
using System.Text;
namespace libhac.Savefile
{
public class Savefile
{
public Header Header { get; }
public RemapStream FileRemap { get; }
public Savefile(Stream file)
{
using (var reader = new BinaryReader(file, Encoding.Default, true))
{
Header = new Header(reader);
FileRemap = new RemapStream(
new SubStream(file, Header.Layout.FileMapDataOffset, Header.Layout.FileMapDataSize),
Header.FileMapEntries, Header.FileRemap.MapSegmentCount);
}
}
}
}