File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,17 @@ internal unsafe struct IDBlockRaw
25
25
public ushort IdVer ;
26
26
public fixed byte IdReserved2 [ 4 ] ;
27
27
public ushort IdUnfinFlags ;
28
+
29
+ public string IdFileStr
30
+ {
31
+ get
32
+ {
33
+ fixed ( byte * p = IdFile )
34
+ {
35
+ return new string ( ( sbyte * ) p , 0 , 8 ) ;
36
+ }
37
+ }
38
+ }
28
39
}
29
40
30
41
@@ -135,7 +146,7 @@ public override int CopyTo(byte[] fullBuffer, int offset)
135
146
}
136
147
}
137
148
138
- internal class Mdf4DZBlock : Mdf4DataBlock
149
+ internal class Mdf4DZBlock : Mdf4DataBlock , IMdf4DataRoot
139
150
{
140
151
public enum ZLibCompressionInfo : byte
141
152
{
@@ -276,6 +287,19 @@ public struct Raw
276
287
public byte ZLibHeader ;
277
288
public ZLibCompressionInfo CompressionInfo ;
278
289
}
290
+
291
+ public Mdf4DataBlock this [ int index ] => this ;
292
+
293
+ public uint BlockCount => 1 ;
294
+ public IEnumerable < Mdf4DataBlock > GetAllDataBlocks ( )
295
+ {
296
+ yield return this ;
297
+ }
298
+
299
+ public IEnumerable < DataBlockMap > GetBlockMap ( ) => new DataBlockMap [ 1 ]
300
+ {
301
+ new DataBlockMap ( Offset , 0 , Parser )
302
+ } ;
279
303
}
280
304
281
305
internal class Mdf4DLBlock : Mdf4Block , IMdf4DataRoot
You can’t perform that action at this time.
0 commit comments