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