"Fossies" - the Fresh Open Source Software Archive

Member "unrar/headers5.hpp" (4 May 2022, 4242 Bytes) of package /linux/misc/unrarsrc-6.1.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "headers5.hpp" see the Fossies "Dox" file reference documentation.

    1 #ifndef _RAR_HEADERS5_
    2 #define _RAR_HEADERS5_
    3 
    4 #define  SIZEOF_MARKHEAD5        8  // RAR 5.0 signature length.
    5 #define  SIZEOF_SHORTBLOCKHEAD5  7  // Smallest RAR 5.0 block size.
    6 
    7 // RAR 5.0 block flags common for all blocks.
    8 
    9 // Additional extra area is present in the end of block header.
   10 #define HFL_EXTRA           0x0001
   11 // Additional data area is present in the end of block header.
   12 #define HFL_DATA            0x0002
   13 // Unknown blocks with this flag must be skipped when updating an archive.
   14 #define HFL_SKIPIFUNKNOWN   0x0004
   15 // Data area of this block is continuing from previous volume.
   16 #define HFL_SPLITBEFORE     0x0008
   17 // Data area of this block is continuing in next volume.
   18 #define HFL_SPLITAFTER      0x0010
   19 // Block depends on preceding file block.
   20 #define HFL_CHILD           0x0020
   21 // Preserve a child block if host is modified.
   22 #define HFL_INHERITED       0x0040
   23 
   24 // RAR 5.0 main archive header specific flags.
   25 #define MHFL_VOLUME         0x0001 // Volume.
   26 #define MHFL_VOLNUMBER      0x0002 // Volume number field is present. True for all volumes except first.
   27 #define MHFL_SOLID          0x0004 // Solid archive.
   28 #define MHFL_PROTECT        0x0008 // Recovery record is present.
   29 #define MHFL_LOCK           0x0010 // Locked archive.
   30 
   31 // RAR 5.0 file header specific flags.
   32 #define FHFL_DIRECTORY      0x0001 // Directory.
   33 #define FHFL_UTIME          0x0002 // Time field in Unix format is present.
   34 #define FHFL_CRC32          0x0004 // CRC32 field is present.
   35 #define FHFL_UNPUNKNOWN     0x0008 // Unknown unpacked size.
   36 
   37 // RAR 5.0 end of archive header specific flags.
   38 #define EHFL_NEXTVOLUME     0x0001 // Not last volume.
   39 
   40 // RAR 5.0 archive encryption header specific flags.
   41 #define CHFL_CRYPT_PSWCHECK 0x0001 // Password check data is present.
   42 
   43 
   44 // RAR 5.0 file compression flags.
   45 #define FCI_ALGO_BIT0       0x0001 // Version of compression algorithm.
   46 #define FCI_ALGO_BIT1       0x0002 // 0 .. 63.
   47 #define FCI_ALGO_BIT2       0x0004
   48 #define FCI_ALGO_BIT3       0x0008
   49 #define FCI_ALGO_BIT4       0x0010
   50 #define FCI_ALGO_BIT5       0x0020
   51 #define FCI_SOLID           0x0040 // Solid flag.
   52 #define FCI_METHOD_BIT0     0x0080 // Compression method.
   53 #define FCI_METHOD_BIT1     0x0100 // 0 .. 5 (6 and 7 are not used).
   54 #define FCI_METHOD_BIT2     0x0200
   55 #define FCI_DICT_BIT0       0x0400 // Dictionary size.
   56 #define FCI_DICT_BIT1       0x0800 // 128 KB .. 4 GB.
   57 #define FCI_DICT_BIT2       0x1000
   58 #define FCI_DICT_BIT3       0x2000
   59 
   60 // Main header extra field values.
   61 #define MHEXTRA_LOCATOR       0x01 // Position of quick list and other blocks.
   62 
   63 // Flags for MHEXTRA_LOCATOR.
   64 #define MHEXTRA_LOCATOR_QLIST 0x01 // Quick open offset is present.
   65 #define MHEXTRA_LOCATOR_RR    0x02 // Recovery record offset is present.
   66 
   67 // File and service header extra field values.
   68 #define FHEXTRA_CRYPT         0x01 // Encryption parameters.
   69 #define FHEXTRA_HASH          0x02 // File hash.
   70 #define FHEXTRA_HTIME         0x03 // High precision file time.
   71 #define FHEXTRA_VERSION       0x04 // File version information.
   72 #define FHEXTRA_REDIR         0x05 // File system redirection (links, etc.).
   73 #define FHEXTRA_UOWNER        0x06 // Unix owner and group information.
   74 #define FHEXTRA_SUBDATA       0x07 // Service header subdata array.
   75 
   76 
   77 // Hash type values for FHEXTRA_HASH.
   78 #define FHEXTRA_HASH_BLAKE2    0x00
   79 
   80 // Flags for FHEXTRA_HTIME.
   81 #define FHEXTRA_HTIME_UNIXTIME 0x01 // Use Unix time_t format.
   82 #define FHEXTRA_HTIME_MTIME    0x02 // mtime is present.
   83 #define FHEXTRA_HTIME_CTIME    0x04 // ctime is present.
   84 #define FHEXTRA_HTIME_ATIME    0x08 // atime is present.
   85 #define FHEXTRA_HTIME_UNIX_NS  0x10 // Unix format with nanosecond precision.
   86 
   87 // Flags for FHEXTRA_CRYPT.
   88 #define FHEXTRA_CRYPT_PSWCHECK 0x01 // Store password check data.
   89 #define FHEXTRA_CRYPT_HASHMAC  0x02 // Use MAC for unpacked data checksums.
   90 
   91 // Flags for FHEXTRA_REDIR.
   92 #define FHEXTRA_REDIR_DIR      0x01 // Link target is directory.
   93 
   94 // Flags for FHEXTRA_UOWNER.
   95 #define FHEXTRA_UOWNER_UNAME   0x01 // User name string is present.
   96 #define FHEXTRA_UOWNER_GNAME   0x02 // Group name string is present.
   97 #define FHEXTRA_UOWNER_NUMUID  0x04 // Numeric user ID is present.
   98 #define FHEXTRA_UOWNER_NUMGID  0x08 // Numeric group ID is present.
   99 
  100 #endif