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