public ArkArchive(Stream stream) { mbb = stream; mbbReader = new BinaryReader(mbb); mbbWriter = new BinaryWriter(mbb); state = new ArkArchiveState(); isSlice = false; totalOffset = 0; }
private ArkArchive(ArkArchive toClone, int size) { if (toClone.mbb.Position + size > toClone.mbb.Length) { toClone.DebugMessage($"Requesting {size} bytes with only {toClone.mbb.Length - toClone.mbb.Position} bytes available"); throw new ArgumentOutOfRangeException(nameof(size)); } totalOffset = toClone.totalOffset + toClone.mbb.Position; mbb = new MemoryStream(toClone.mbbReader.ReadBytes(size)); mbbReader = new BinaryReader(mbb); state = toClone.state; isSlice = true; }
private ArkArchive(ArkArchive toClone) { throw new NotImplementedException("Broken feature"); #pragma warning disable 162 mbb = new MemoryStream(); toClone.mbb.CopyTo(mbb); NameTable = toClone.NameTable; nameMap = toClone.nameMap; nameOffset = toClone.nameOffset; HasInstanceInNameTable = toClone.HasInstanceInNameTable; state = toClone.state; isSlice = toClone.isSlice; totalOffset = toClone.totalOffset; #pragma warning restore 162 }