Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GZipHeader.h « GZip « Archive « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e83548ebdb581e007e1bdfe21100057a0c24eedf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Archive/GZip/Header.h

#ifndef __ARCHIVE_GZIP_HEADER_H
#define __ARCHIVE_GZIP_HEADER_H

#include "Common/Types.h"

namespace NArchive {
namespace NGZip {

extern UInt16 kSignature;
static const UInt32 kSignatureSize = 2;

namespace NFileHeader
{
  /*
  struct CBlock
  {
    UInt16 Id;
    Byte CompressionMethod;
    Byte Flags;
    UInt32 Time;
    Byte ExtraFlags;
    Byte HostOS;
  };
  */
  
  namespace NFlags 
  {
    const int kDataIsText = 1 << 0;
    const int kHeaderCRCIsPresent = 1 << 1;
    const int kExtraIsPresent = 1 << 2;
    const int kNameIsPresent = 1 << 3;
    const int kComentIsPresent = 1 << 4;
  }
  
  namespace NExtraFlags 
  {
    enum EEnum
    {
      kMaximum = 2,
      kFastest = 4
    };
  }
  
  namespace NCompressionMethod
  {
    const Byte kDeflate = 8;
  }

  namespace NHostOS
  {
    enum EEnum
    {
      kFAT      = 0,  // filesystem used by MS-DOS, OS/2, Win32 
        // pkzip 2.50 (FAT / VFAT / FAT32 file systems)
        kAMIGA    = 1,
        kVMS      = 2,  // VAX/VMS
        kUnix     = 3,
        kVM_CMS   = 4,
        kAtari    = 5,  // what if it's a minix filesystem? [cjh]
        kHPFS     = 6,  // filesystem used by OS/2 (and NT 3.x)
        kMac      = 7,
        kZ_System = 8,
        kCPM      = 9,
        kTOPS20   = 10, // pkzip 2.50 NTFS 
        kNTFS     = 11, // filesystem used by Windows NT 
        kQDOS     = 12, // SMS/QDOS
        kAcorn    = 13, // Archimedes Acorn RISC OS
        kVFAT     = 14, // filesystem used by Windows 95, NT
        kMVS      = 15,
        kBeOS     = 16, // hybrid POSIX/database filesystem
                        // BeBOX or PowerMac 
        kTandem   = 17,
        kTHEOS    = 18,

        kUnknown = 255
    };
    const int kNumHostSystems = 19;
  }
}

}}

#endif