コード例 #1
0
        public override BasicHeader Deserialize(RecyclableMemoryStream target)
        {
            base.Deserialize(target);
            var contentTypeLength = target.ReadUInt16();

            ContentType = EmptyContent;
            if (contentTypeLength > 0)
            {
                ContentType = new byte[contentTypeLength];
                target.Read(ContentType, 0, contentTypeLength);
            }
            int len = target.ReadInt16();

            ContentLength = new int[len];
            for (var i = 0; i < len; i++)
            {
                ContentLength[i] = target.Read7BitInt();
            }

            return(this);
        }