navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
Go to the documentation of this file.
20 #ifndef __ZIPFILE_H__
21 #define __ZIPFILE_H__
24 #pragma pack(push)
25 #pragma pack(1)
26 #endif
28 #ifdef __GNUC__
29 #define ATTRIBUTE_PACKED __attribute__ ((packed))
30 #else
32 #endif
34 #define zip_split_sig 0x08074b50
35 #define zip_split_sig_rev 0x504b0708
37 struct zip_split {
39 };
41 #define zip_lfh_sig 0x04034b50
42 #define zip_lfh_sig_rev 0x504b0304
49 struct zip_lfh {
50  int ziplocsig;
51  short zipver;
52  short zipgenfld;
53  short zipmthd;
54  short ziptime;
55  short zipdate;
56  int zipcrc;
57  unsigned int zipsize;
58  unsigned int zipuncmp;
59  unsigned short zipfnln;
60  unsigned short zipxtraln;
61  char zipname[0];
64 #define zip_cd_sig 0x02014b50
65 #define zip_cd_sig_rev 0x504b0102
71 struct zip_cd {
72  int zipcensig;
73  char zipcver;
74  char zipcos;
75  char zipcvxt;
76  char zipcexos;
77  short zipcflg;
78  short zipcmthd;
79  short ziptim;
80  short zipdat;
81  int zipccrc;
82  unsigned int zipcsiz;
83  unsigned int zipcunc;
84  unsigned short zipcfnl;
85  unsigned short zipcxtl;
86  unsigned short zipccml;
87  unsigned short zipdsk;
88  unsigned short zipint;
89  unsigned int zipext;
90  unsigned int zipofst;
91  char zipcfn[0];
99 #define zip_size_64bit_placeholder 0xffffffff
104 #define zip_extra_header_id_zip64 0x0001
110 struct zip_cd_ext {
111  short tag;
112  short size;
113  unsigned long long zipofst;
116 struct zip_enc {
118  short efield_size;
119  short version;
125 #define zip_eoc_sig 0x6054b50
126 #define zip_eoc_sig_rev 0x504b0506
132 struct zip_eoc {
133  int zipesig; /* end of central dir signature */
134  unsigned short zipedsk; /* number of this disk */
135  unsigned short zipecen; /* number of the disk with the start of the central directory */
136  unsigned short zipenum; /* total number of entries in the central directory on this disk */
137  unsigned short zipecenn; /* total number of entries in the central directory */
138  unsigned int zipecsz; /* size of the central directory */
139  unsigned int zipeofst; /* offset of start of central directory with respect to the starting disk number */
140  short zipecoml; /* .ZIP file comment length */
141  char zipecom[0]; /* .ZIP file comment */
144 #define zip64_eoc_sig 0x6064b50
145 #define zip64_eoc_sig_rev 0x504b0606
147 struct zip64_eoc {
148  int zip64esig; /* zip64 end of central dir signature */
149  unsigned long long zip64esize; /* size of zip64 end of central directory record */
150  unsigned short zip64ever; /* version made by */
151  unsigned short zip64eneed; /* version needed to extract */
152  unsigned int zip64edsk; /* number of this disk */
153  unsigned int zip64ecen; /* number of the disk with the start of the central directory */
154  unsigned long long zip64enum; /* total number of entries in the central directory on this disk */
155  unsigned long long zip64ecenn; /* total number of entries in the central directory */
156  unsigned long long zip64ecsz; /* size of the central directory */
157  unsigned long long zip64eofst; /* offset of start of central directory with respect to the starting disk number */
158  char zip64ecom[0]; /* zip64 extensible data sector */
161 #define zip64_eocl_sig 0x07064b50
163 struct zip64_eocl {
166  long long zip64lofst;
171  int x[sizeof(struct zip_cd) == 46 ? 1:-1];
172 };
175 #pragma pack(pop)
176 #endif
177 #endif
short zipdate
file modification date
Definition: zipfile.h:55
unsigned int zipcunc
file size (uncompressed)
Definition: zipfile.h:83
unsigned int zip64ecen
Definition: zipfile.h:153
unsigned int zipofst
offset to start of local file header
Definition: zipfile.h:90
char vendor_id1
Definition: zipfile.h:120
unsigned short zipecenn
Definition: zipfile.h:137
char zipname[0]
file name (length as given above)
Definition: zipfile.h:61
unsigned int zipext
external attributes
Definition: zipfile.h:89
unsigned int zip64edsk
Definition: zipfile.h:152
int zipcrc
CRC-32 checksum.
Definition: zipfile.h:56
unsigned short zipdsk
disk number of file
Definition: zipfile.h:87
unsigned int zipecsz
Definition: zipfile.h:138
unsigned long long zip64eofst
Definition: zipfile.h:157
ZIP end of central directory structure.
Definition: zipfile.h:132
unsigned long long zip64enum
Definition: zipfile.h:154
unsigned int zipcsiz
file size (after compression)
Definition: zipfile.h:82
short tag
extra field header ID
Definition: zipfile.h:111
unsigned long long zip64esize
Definition: zipfile.h:149
unsigned short zipccml
comment length
Definition: zipfile.h:86
unsigned short zipcfnl
file name length
Definition: zipfile.h:84
Definition: zipfile.h:163
int zipccrc
CRC-32 checksum.
Definition: zipfile.h:81
char zip64ecom[0]
Definition: zipfile.h:158
unsigned long long zip64ecsz
Definition: zipfile.h:156
int zipsplitsig
Definition: zipfile.h:38
int zip64esig
Definition: zipfile.h:148
short zipmthd
compression method
Definition: zipfile.h:53
short ziptim
file modification time
Definition: zipfile.h:79
unsigned int zipsize
file size (after compression)
Definition: zipfile.h:57
char zipecom[0]
Definition: zipfile.h:141
unsigned short zip64eneed
Definition: zipfile.h:151
ZIP local file header structure.
Definition: zipfile.h:49
int zipesig
Definition: zipfile.h:133
unsigned short zipenum
Definition: zipfile.h:136
unsigned short zipint
internal attributes
Definition: zipfile.h:88
short efield_size
Definition: zipfile.h:118
short ziptime
file modification time
Definition: zipfile.h:54
short zipver
minimum zip spec version needed to extract
Definition: zipfile.h:51
char zipcfn[0]
file name (length as given above)
Definition: zipfile.h:91
char zipcos
os compatibility of the file attribute information
Definition: zipfile.h:74
Definition: zipfile.h:147
short zipgenfld
general purpose flags
Definition: zipfile.h:52
short zipecoml
Definition: zipfile.h:140
short compress_method
Definition: zipfile.h:122
unsigned short zip64ever
Definition: zipfile.h:150
char zipcvxt
minimum zip spec version needed to extract
Definition: zipfile.h:75
int x[sizeof(struct zip_cd)==46?1:-1]
Definition: zipfile.h:171
unsigned int zipeofst
Definition: zipfile.h:139
int zip74lnum
Definition: zipfile.h:167
unsigned short zipecen
Definition: zipfile.h:135
Definition: zipfile.h:116
int zip64lsig
Definition: zipfile.h:164
char vendor_id2
Definition: zipfile.h:120
unsigned int zipuncmp
file size (uncompressed)
Definition: zipfile.h:58
char zipcver
zip spec version of creating software
Definition: zipfile.h:73
short version
Definition: zipfile.h:119
unsigned short zipedsk
Definition: zipfile.h:134
ZIP extra field structure.
Definition: zipfile.h:110
int zip64ldsk
Definition: zipfile.h:165
short efield_header
Definition: zipfile.h:117
short size
extra field data size
Definition: zipfile.h:112
unsigned long long zipofst
offset to start of local file header (only valid if the struct is for a ZIP64 extra field) ...
Definition: zipfile.h:113
short zipcmthd
compression method
Definition: zipfile.h:78
char zipcexos
unused (?)
Definition: zipfile.h:76
Definition: zipfile.h:31
unsigned short zipcxtl
extra field length
Definition: zipfile.h:85
int zipcensig
central directory signature
Definition: zipfile.h:72
Definition: zipfile.h:37
short zipcflg
general purpose flag
Definition: zipfile.h:77
long long zip64lofst
Definition: zipfile.h:166
char encryption_strength
Definition: zipfile.h:121
ZIP central directory structure.
Definition: zipfile.h:71
unsigned short zipxtraln
extra filed length (unused?)
Definition: zipfile.h:60
Definition: zipfile.h:170
unsigned long long zip64ecenn
Definition: zipfile.h:155
int ziplocsig
local file header signature
Definition: zipfile.h:50
short zipdat
file modification date
Definition: zipfile.h:80
unsigned short zipfnln
file name length
Definition: zipfile.h:59