Beispiel #1
0
            private Class49.Class52.Class58 method_10(Class889 w, ulong handle, Stream data)
            {
                Class49.Class52.Class58 class58 = new Class49.Class52.Class58();
                class58.method_0((ulong)data.Length);
                uint num1 = 0;
                int  num2 = 0;

                for (; (ulong)num1 < class58.TotalDataSize; num1 += class58.PageSize)
                {
                    ulong           num3    = (ulong)(w.Position - this.long_0);
                    Class49.Class56 class56 = new Class49.Class56()
                    {
                        TotalDataSize = class58.TotalDataSize, PageCount = (int)class58.PageCount, PageDataSize = (long)num2 < (long)(class58.PageCount - 1U) ? (ulong)class58.PageSize : (ulong)class58.LastPageSize, PageIndex = num2, PageStartOffset = (ulong)num1
                    };
                    class56.Header.SegmentIndex = this.uint_0;
                    class56.BinaryData          = new Class882(data, (int)class56.PageStartOffset, (int)class56.PageDataSize);
                    class56.Write(this);
                    class58.Pages.Add(new Class49.Class52.Class58.Class59()
                    {
                        SegmentIndex = this.uint_0,
                        Size         = (uint)class56.PageDataSize
                    });
                    this.method_8(new Class49.Class51.Class57()
                    {
                        Offset = num3,
                        Size   = class56.Header.SegmentSize
                    });
                    ++num2;
                }
                return(class58);
            }
Beispiel #2
0
                public Stream imethod_0(Class741.Class742 serializer)
                {
                    PagedMemoryStream pagedMemoryStream = new PagedMemoryStream((long)(int)this.ulong_0);
                    int num = 0;

                    foreach (Class49.Class52.Class58.Class59 class59 in this.list_0)
                    {
                        serializer.Stream.Position = serializer.DataStoreStreamStartPosition + (long)serializer.SegmentIndex.Entries[(int)class59.SegmentIndex].Offset;
                        Class49.Class56 class56 = new Class49.Class56();
                        class56.Read(serializer);
                        if ((long)class56.BinaryData.Length != (long)class59.Size)
                        {
                            throw new Exception("Blob binary data size does not match expected size.");
                        }
                        StreamUtil.Forward(class56.BinaryData.Stream, class56.BinaryData.Offset, (Stream)pagedMemoryStream, class56.BinaryData.Length);
                        num += (int)class59.Size;
                    }
                    pagedMemoryStream.Position = 0L;
                    return((Stream)pagedMemoryStream);
                }