1 //-----------------------------------------------------------------------------
3 // Copyright (C) Microsoft Corporation. All Rights Reserved.
5 //-----------------------------------------------------------------------------
8 namespace Microsoft
.Cci
.Pdb
{
9 internal class MsfDirectory
{
10 internal MsfDirectory(PdbReader reader
, PdbFileHeader head
, BitAccess bits
) {
11 bits
.MinCapacity(head
.directorySize
);
12 int pages
= reader
.PagesFromSize(head
.directorySize
);
14 // 0..n in page of directory pages.
15 reader
.Seek(head
.directoryRoot
, 0);
16 bits
.FillBuffer(reader
.reader
, pages
* 4);
18 DataStream stream
= new DataStream(head
.directorySize
, bits
, pages
);
19 bits
.MinCapacity(head
.directorySize
);
20 stream
.Read(reader
, bits
);
22 // 0..3 in directory pages
24 bits
.ReadInt32(out count
);
27 int[] sizes
= new int[count
];
28 bits
.ReadInt32(sizes
);
31 streams
= new DataStream
[count
];
32 for (int i
= 0; i
< count
; i
++) {
34 streams
[i
] = new DataStream();
36 streams
[i
] = new DataStream(sizes
[i
], bits
,
37 reader
.PagesFromSize(sizes
[i
]));
42 internal DataStream
[] streams
;