-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathLayoutsU4K.cs
66 lines (58 loc) · 1.77 KB
/
LayoutsU4K.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) 2016, Dijji, and released under Ms-PL. This can be found in the root of this distribution.
using System;
using System.Runtime.InteropServices;
namespace XstReader
{
// xst layouts that are specific to Unicode files with 4K pages
// These are not documented in <MS-PST>, But taken instead from libpff
// and https://blog.mythicsoft.com/2015/07/10/ost-2013-file-format-the-missing-documentation/
// Constants
class LayoutsU4K
{
public const int BTPAGEEntryBytes = 4056;
}
// NDB layer
[StructLayout(LayoutKind.Sequential, Pack = 1)]
unsafe struct BTPAGEUnicode4K
{
public fixed Byte rgentries[LayoutsU4K.BTPAGEEntryBytes];
public UInt16 cEnt;
public UInt16 cEntMax;
public Byte cbEnt;
public Byte cLevel;
public UInt16 dwPadding1;
public UInt32 dwPadding2;
public UInt32 dwPadding3;
public PAGETRAILERUnicode4K pageTrailer;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct PAGETRAILERUnicode4K
{
public Eptype ptype;
public Eptype ptypeRepeat;
public UInt16 wSig;
public UInt32 dwCRC;
public UInt64 bid;
public UInt64 unknown;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct BBTENTRYUnicode4K
{
public BREFUnicode BREF;
public UInt16 cbStored;
public UInt16 cbInflated;
public UInt16 cRef;
public UInt16 wPadding;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct BLOCKTRAILERUnicode4K
{
public UInt16 cb;
public UInt16 wSig;
public UInt32 dwCRC;
public UInt64 bid;
public UInt16 unknown1;
public UInt16 cbInflated;
public UInt32 unknown2;
}
}