public void Read(BinaryReader reader) { reader.BaseStream.Seek(_Offset, SeekOrigin.Begin); while (reader.BaseStream.Position < _Offset + _Length) { switch (reader.ReadByte()) { case 0: reader.ReadByte(); break; case 1: { short count = reader.ReadInt16(); byte[] array = reader.ReadBytes(count); break; } case 2: { int size = reader.ReadInt32(); _DescriptorOffsets = new FileOffsetCollection(); _DescriptorOffsets.Read(reader, GetOffsetsCount(size, PieceDescriptor.Size)); _Descriptors = ReadDescriptors(reader, GetDescriptorsCount(size, PieceDescriptor.Size)); break; } } } }
public void AddRange(FileOffsetCollection offsets) { base.InnerList.AddRange(offsets); }