示例#1
0
        public static ListField DecodingList(Stream stream)
        {
            var begin = stream.ReadByte();

            if (begin != _startLists)
            {
                throw new Exception("list开始字节错误");
            }
            var result = ListField.Create();

            while (true)
            {
                var t = stream.ReadByte();
                if (t == _end)
                {
                    return(result);
                }
                else
                {
                    stream.Position -= 1;
                }
                result.Value.Add(Decode(stream));
            }
        }