zhao
2021-06-24 02ca96debc6056275d58e55d97f7885a195542d0
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using System;
using System.Collections.Generic;
using System.Text;
 
namespace HH.WMS.Utils.ExcelLibrary.CompoundDocumentFormat
{
    public class FileHeader
    {
        /// <summary>
        /// Compound document file identifier: D0H CFH 11H E0H A1H B1H 1AH E1H
        /// </summary>
        public byte[] FileTypeIdentifier;
 
        /// <summary>
        /// Unique identifier (UID) of this file (not of interest in the following, may be all 0)
        /// </summary>
        public Guid FileIdentifier;
 
        /// <summary>
        /// Revision number of the file format (most used is 003EH)
        /// </summary>
        public UInt16 RevisionNumber;
 
        /// <summary>
        /// Version number of the file format (most used is 0003H)
        /// </summary>
        public UInt16 VersionNumber;
 
        /// <summary>
        /// Byte order identifier: FEH FFH = Little-Endian FFH FEH = Big-Endian
        /// </summary>
        public byte[] ByteOrderMark;
 
        /// <summary>
        /// Size of a sector in the compound document file in power-of-two (ssz),
        /// (most used value is 9 which means 512 bytes, minimum value is 7 which means 128 bytes)
        /// </summary>
        public UInt16 SectorSizeInPot;
 
        /// <summary>
        /// Size of a short-sector in the short-stream container stream in power-of-two (ssz),
        /// (most used value is 6 which means 64 bytes, maximum value is sector size  in power-of-two)
        /// </summary>
        public UInt16 ShortSectorSizeInPot;
 
        /// <summary>
        /// Not used
        /// </summary>
        public byte[] UnUsed10;
 
        /// <summary>
        /// Total number of sectors used for the sector allocation table
        /// </summary>
        public Int32 NumberOfSATSectors;
 
        /// <summary>
        /// SID of first sector of the directory stream
        /// </summary>
        public Int32 FirstSectorIDofDirectoryStream;
 
        /// <summary>
        /// Not used
        /// </summary>
        public byte[] UnUsed4;
 
        /// <summary>
        /// Minimum size of a standard stream (in bytes, most used size is 4096 bytes),
        /// streams smaller than this value are stored as short-streams
        /// </summary>
        public Int32 MinimumStreamSize;
 
        /// <summary>
        /// SID of first sector of the short-sector allocation table,
        /// or ¨C2 (End Of Chain SID) if not extant
        /// </summary>
        public Int32 FirstSectorIDofShortSectorAllocationTable;
 
        /// <summary>
        /// Total number of sectors used for the short-sector allocation table
        /// </summary>
        public Int32 NumberOfShortSectors;
 
        /// <summary>
        /// SID of first sector of the master sector allocation table,
        /// or ¨C2 (End Of Chain SID) if no additional sectors used
        /// </summary>
        public Int32 FirstSectorIDofMasterSectorAllocationTable;
 
        /// <summary>
        /// Total number of sectors used for the master sector allocation table
        /// </summary>
        public Int32 NumberOfMasterSectors;
 
        /// <summary>
        /// First part of the master sector allocation table containing 109 SIDs
        /// </summary>
        public Int32[] MasterSectorAllocationTable;
    }
}