コード例 #1
0
        public static IEnumerable <Imgd> ReadAsFac(Stream stream)
        {
            stream.SetPosition(0);
            while (true)
            {
                stream.AlignPosition(FacAlignment);
                var subStreamLength = stream.Length - stream.Position;
                if (subStreamLength < HeaderLength)
                {
                    yield break;
                }

                yield return(Imgd.Read(new SubStream(stream, stream.Position, subStreamLength)));
            }
        }
コード例 #2
0
ファイル: Imgz.cs プロジェクト: xorllc/OpenKh
 public static IEnumerable <Imgd> Read(Stream stream) =>
 OpenAsStream(stream.SetPosition(0)).Select(x => Imgd.Read(x)).ToArray();