(ArcStream): added CreateStream method with single argument.

This commit is contained in:
morkt 2014-08-16 10:37:25 +04:00
parent dc30eb0083
commit 83e4414ffc

View File

@ -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);