1 |
|
---|
2 |
|
---|
3 |
|
---|
4 | #pragma pack(4) /* Misdesigned header, not 8-byte aligned size. */
|
---|
5 | typedef struct XARHEADER
|
---|
6 | {
|
---|
7 | /** The magic number 'xar!' (XAR_HEADER_MAGIC). */
|
---|
8 | uint32_t u32Magic;
|
---|
9 | /** The size of this header structure. */
|
---|
10 | uint16_t cbHeader;
|
---|
11 | /** The header version structure. */
|
---|
12 | uint16_t uVersion;
|
---|
13 | /** The size of the compressed table of content (TOC). */
|
---|
14 | uint64_t cbTocCompressed;
|
---|
15 | /** The size of the table of context (TOC) when not compressed. */
|
---|
16 | uint64_t cbTocUncompressed;
|
---|
17 | /** Which cryptographic hash function is used (XAR_HASH_XXX). */
|
---|
18 | uint32_t uHashFunction;
|
---|
19 | } XARHEADER;
|
---|
20 | #pragma pack()
|
---|
21 | /** Pointer to a XAR header. */
|
---|
22 | typedef XARHEADER *PXARHEADER;
|
---|
23 | /** Pointer to a const XAR header. */
|
---|
24 | typedef XARHEADER const *PCXARHEADER;
|
---|
25 |
|
---|
26 | /** XAR magic value (on disk endian). */
|
---|
27 | #define XAR_HEADER_MAGIC RT_H2LE_U32(RT_MAKE_U32_FROM_U8('x', 'a', 'r', '!'))
|
---|
28 | /** The current header version value (host endian). */
|
---|
29 | #define XAR_HEADER_VERSION 1
|
---|
30 |
|
---|
31 | /** @name XAR hashing functions.
|
---|
32 | * @{ */
|
---|
33 | #define XAR_HASH_NONE 0
|
---|
34 | #define XAR_HASH_SHA1 1
|
---|
35 | #define XAR_HASH_MD5 2
|
---|
36 | #define XAR_HASH_MAX 2
|
---|
37 | /** @} */
|
---|
38 |
|
---|