2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
23 #ifdef HAVE_PRAGMA_PACK
29 #define ATTRIBUTE_PACKED __attribute__ ((packed))
31 #define ATTRIBUTE_PACKED
34 #define zip_split_sig 0x08074b50
35 #define zip_split_sig_rev 0x504b0708
41 #define zip_lfh_sig 0x04034b50
42 #define zip_lfh_sig_rev 0x504b0304
52 unsigned int zipsize; // 18
53 unsigned int zipuncmp; // 22
54 unsigned short zipfnln; // 26
55 unsigned short zipxtraln; // 30
56 char zipname[0]; // 34
59 #define zip_cd_sig 0x02014b50
60 #define zip_cd_sig_rev 0x504b0102
75 unsigned short zipcfnl;
76 unsigned short zipcxtl;
77 unsigned short zipccml;
78 unsigned short zipdsk;
79 unsigned short zipint;
88 unsigned long long zipofst;
95 char vendor_id1,vendor_id2;
96 char encryption_strength;
97 short compress_method;
100 #define zip_eoc_sig 0x6054b50
101 #define zip_eoc_sig_rev 0x504b0506
104 int zipesig; /* end of central dir signature */
105 unsigned short zipedsk; /* number of this disk */
106 unsigned short zipecen; /* number of the disk with the start of the central directory */
107 unsigned short zipenum; /* total number of entries in the central directory on this disk */
108 unsigned short zipecenn; /* total number of entries in the central directory */
109 unsigned int zipecsz; /* size of the central directory */
110 unsigned int zipeofst; /* offset of start of central directory with respect to the starting disk number */
111 short zipecoml; /* .ZIP file comment length */
112 char zipecom[0]; /* .ZIP file comment */
115 #define zip64_eoc_sig 0x6064b50
116 #define zip64_eoc_sig_rev 0x504b0606
119 int zip64esig; /* zip64 end of central dir signature */
120 unsigned long long zip64esize; /* size of zip64 end of central directory record */
121 unsigned short zip64ever; /* version made by */
122 unsigned short zip64eneed; /* version needed to extract */
123 unsigned int zip64edsk; /* number of this disk */
124 unsigned int zip64ecen; /* number of the disk with the start of the central directory */
125 unsigned long long zip64enum; /* total number of entries in the central directory on this disk */
126 unsigned long long zip64ecenn; /* total number of entries in the central directory */
127 unsigned long long zip64ecsz; /* size of the central directory */
128 unsigned long long zip64eofst; /* offset of start of central directory with respect to the starting disk number */
129 char zip64ecom[0]; /* zip64 extensible data sector */
132 #define zip64_eocl_sig 0x07064b50
137 long long zip64lofst;
141 struct zip_alignment_check {
142 int x[sizeof(struct zip_cd) == 46 ? 1:-1];
145 #ifdef HAVE_PRAGMA_PACK