1 // 7z/7zHeader.h
2 
3 #ifndef __7Z_HEADER_H
4 #define __7Z_HEADER_H
5 
6 #include "../../../Common/Types.h"
7 
8 namespace NArchive {
9 namespace N7z {
10 
11 const int kSignatureSize = 6;
12 extern Byte kSignature[kSignatureSize];
13 
14 // #define _7Z_VOL
15 // 7z-MultiVolume is not finished yet.
16 // It can work already, but I still do not like some
17 // things of that new multivolume format.
18 // So please keep it commented.
19 
20 #ifdef _7Z_VOL
21 extern Byte kFinishSignature[kSignatureSize];
22 #endif
23 
24 struct CArchiveVersion
25 {
26   Byte Major;
27   Byte Minor;
28 };
29 
30 const Byte kMajorVersion = 0;
31 
32 struct CStartHeader
33 {
34   UInt64 NextHeaderOffset;
35   UInt64 NextHeaderSize;
36   UInt32 NextHeaderCRC;
37 };
38 
39 const UInt32 kStartHeaderSize = 20;
40 
41 #ifdef _7Z_VOL
42 struct CFinishHeader: public CStartHeader
43 {
44   UInt64 ArchiveStartOffset;  // data offset from end if that struct
45   UInt64 AdditionalStartBlockSize; // start  signature & start header size
46 };
47 
48 const UInt32 kFinishHeaderSize = kStartHeaderSize + 16;
49 #endif
50 
51 namespace NID
52 {
53   enum EEnum
54   {
55     kEnd,
56 
57     kHeader,
58 
59     kArchiveProperties,
60 
61     kAdditionalStreamsInfo,
62     kMainStreamsInfo,
63     kFilesInfo,
64 
65     kPackInfo,
66     kUnpackInfo,
67     kSubStreamsInfo,
68 
69     kSize,
70     kCRC,
71 
72     kFolder,
73 
74     kCodersUnpackSize,
75     kNumUnpackStream,
76 
77     kEmptyStream,
78     kEmptyFile,
79     kAnti,
80 
81     kName,
82     kCTime,
83     kATime,
84     kMTime,
85     kWinAttributes,
86     kComment,
87 
88     kEncodedHeader,
89 
90     kStartPos,
91     kDummy
92   };
93 }
94 
95 }}
96 
97 #endif
98