zhao
2021-06-04 c7ec496f9e41c2227103b3ef776e4a3f91bce6b2
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
using System;
using System.Collections.Generic;
using System.Text;
 
namespace HH.WMS.Utils.ExcelLibrary.CompoundDocumentFormat
{
    public class CompoundFileHeader : FileHeader
    {
        public new static readonly byte[] FileTypeIdentifier = new byte[8] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 };
        /// <summary>
        /// Create a CompoundFileHeader with default values.
        /// </summary>
        public CompoundFileHeader()
        {
            base.FileTypeIdentifier = FileTypeIdentifier;
            FileIdentifier = Guid.NewGuid();
            RevisionNumber = 0x3E;
            VersionNumber = 0x03;
            ByteOrderMark = ByteOrderMarks.LittleEndian;
            SectorSizeInPot = 9;
            ShortSectorSizeInPot = 6;
            UnUsed10 = new byte[10];
            UnUsed4 = new byte[4];
            MinimumStreamSize = 4096;
            FirstSectorIDofShortSectorAllocationTable = SID.EOC;
            FirstSectorIDofMasterSectorAllocationTable = SID.EOC;
            FirstSectorIDofDirectoryStream = SID.EOC;
            MasterSectorAllocationTable = new Int32[109];
            for (int i = 0; i < MasterSectorAllocationTable.Length; i++)
            {
                MasterSectorAllocationTable[i] = SID.Free;
            }
        }
    }
}