From 83e4414ffc334344977f15ca9d857e85cdb87a41 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 16 Aug 2014 10:37:25 +0400 Subject: [PATCH] (ArcStream): added CreateStream method with single argument. --- GameRes/ArcView.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GameRes/ArcView.cs b/GameRes/ArcView.cs index 814236f1..b9a285da 100644 --- a/GameRes/ArcView.cs +++ b/GameRes/ArcView.cs @@ -165,6 +165,14 @@ namespace GameRes return new ArcStream (this); } + public ArcStream CreateStream (long offset) + { + var size = this.MaxOffset - offset; + if (size > uint.MaxValue) + throw new ArgumentOutOfRangeException ("Too large memory mapped stream"); + return new ArcStream (this, offset, (uint)size); + } + public ArcStream CreateStream (long offset, uint size) { return new ArcStream (this, offset, size);