1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_package_zip_ZipConstants_idl__
28 #define __com_sun_star_package_zip_ZipConstants_idl__
32 //=============================================================================
34 module com
{ module sun
{ module star
{ module packages
{ module zip
{
36 //=============================================================================
38 /** defines the constants used by the ZIP interfaces.
40 published constants ZipConstants
42 //-------------------------------------------------------------------------
43 /** Compression method for the deflate algorithm (the only one currently
46 const short DEFLATED
= 8;
48 //-------------------------------------------------------------------------
49 /** Compression level for no compression.
51 const short NO_COMPRESSION
= 0;
53 //-------------------------------------------------------------------------
54 /** Compression level for fastest compression
56 const short BEST_SPEED
= 1;
58 //-------------------------------------------------------------------------
59 /** Compression level for best compression
61 const short BEST_COMPRESSION
= 9;
63 //-------------------------------------------------------------------------
64 /** Default compression level.
66 const short DEFAULT_COMPRESSION
= -1;
68 //-------------------------------------------------------------------------
69 /** Compression strategy best used for data consisting mostly of small
70 values with a somewhat random distribution. Forces more Huffman
71 coding and less string matching.
73 const short FILTERED
= 1;
75 //-------------------------------------------------------------------------
76 /** Compression strategy for Huffman coding only.
78 const short HUFFMAN_ONLY
= 2;
80 //-------------------------------------------------------------------------
81 /** Default compression strategy
83 const short DEFAULT_STRATEGY
= 0;
85 //-------------------------------------------------------------------------
86 /** entry is uncompressed
88 const short STORED
= 0;
90 //-------------------------------------------------------------------------
91 /** entry is uncompressed
93 const short DEF_MEM_LEVEL
= 8;
95 //-------------------------------------------------------------------------
96 /** Header Signature: "PK\003\004"
98 const long LOCSIG
= 0x04034b50;
100 //-------------------------------------------------------------------------
101 /** Header Signature: "PK\007\008"
103 const long EXTSIG
= 0x08074b50;
105 //-------------------------------------------------------------------------
106 /** Header Signature: "PK\001\002"
108 const long CENSIG
= 0x02014b50;
110 //-------------------------------------------------------------------------
111 /** Header Signature: "PK\005\006"
113 const long ENDSIG
= 0x06054b50;
115 //-------------------------------------------------------------------------
116 /** Header Signature: "PK\007\008"
118 const long SPANSIG
= 0x08074b50;
120 //-------------------------------------------------------------------------
121 /** LOC header size in bytes (including signatures)
123 const short LOCHDR
= 30;
125 //-------------------------------------------------------------------------
126 /** EXT header size in bytes (including signatures)
128 const short EXTHDR
= 16;
130 //-------------------------------------------------------------------------
131 /** CEN header size in bytes (including signatures)
133 const short CENHDR
= 46;
135 //-------------------------------------------------------------------------
136 /** END header size in bytes (including signatures)
138 const short ENDHDR
= 22;
140 //-------------------------------------------------------------------------
142 /** LOC header field "version needed to extract" offset
144 const short LOCVER
= 4;
146 //-------------------------------------------------------------------------
147 /** LOC header field "general purpose bit flags" offset
149 const short LOCFLG
= 6;
151 //-------------------------------------------------------------------------
152 /** LOC header field "compression method" offset
154 const short LOCHOW
= 8;
156 //-------------------------------------------------------------------------
157 /** LOC header field "modification time" offset
159 const short LOCTIM
= 10;
161 //-------------------------------------------------------------------------
162 /** LOC header field "crc of uncompressed data" offset
164 const short LOCCRC
= 14;
166 //-------------------------------------------------------------------------
167 /** LOC header field "compressed data size" offset
169 const short LOCSIZ
= 18;
171 //-------------------------------------------------------------------------
172 /** LOC header field "uncompressed data size" offset
174 const short LOCLEN
= 22;
176 //-------------------------------------------------------------------------
177 /** LOC header field "filename length" offset
179 const short LOCNAM
= 26;
181 //-------------------------------------------------------------------------
182 /** LOC header field "extra field length" offset
184 const short LOCEXT
= 28;
186 //-------------------------------------------------------------------------
187 /** EXT header field "crc of uncompressed data" offsets
189 const short EXTCRC
= 4;
191 //-------------------------------------------------------------------------
192 /** EXT header field "compressed size" offsets
194 const short EXTSIZ
= 8;
196 //-------------------------------------------------------------------------
197 /** EXT header field "uncompressed size" offsets
199 const short EXTLEN
= 12;
201 //-------------------------------------------------------------------------
202 /** CEN header field "version made by" offset
204 const short CENVEM
= 4;
206 //-------------------------------------------------------------------------
207 /** CEN header field "version needed to extract" offset
209 const short CENVER
= 6;
211 //-------------------------------------------------------------------------
212 /** CEN header field "general purpose bit flags" offset
214 const short CENFLG
= 8;
216 //-------------------------------------------------------------------------
217 /** CEN header field "compression method" offset
219 const short CENHOW
= 10;
221 //-------------------------------------------------------------------------
222 /** CEN header field "modification time" offset
224 const short CENTIM
= 12;
226 //-------------------------------------------------------------------------
227 /** CEN header field "modification time" offset
229 const short CENDAT
= 14;
231 //-------------------------------------------------------------------------
232 /** CEN header field "crc of uncompressed data" offset
234 const short CENCRC
= 16;
236 //-------------------------------------------------------------------------
237 /** CEN header field "compressed size" offset
239 const short CENSIZ
= 20;
241 //-------------------------------------------------------------------------
242 /** CEN header field "uncompressed size" offset
244 const short CENLEN
= 24;
246 //-------------------------------------------------------------------------
247 /** CEN header field "length of filename" offset
249 const short CENNAM
= 28;
251 //-------------------------------------------------------------------------
252 /** CEN header field "length of extra field" offset
254 const short CENEXT
= 30;
256 //-------------------------------------------------------------------------
257 /** CEN header field "file comment length" offset
259 const short CENCOM
= 32;
261 //-------------------------------------------------------------------------
262 /** CEN header field "disk number start" offset
264 const short CENDSK
= 34;
266 //-------------------------------------------------------------------------
267 /** CEN header field "internal file attributes" offset
269 const short CENATT
= 36;
271 //-------------------------------------------------------------------------
272 /** CEN header field "external file attributes" offset
274 const short CENATX
= 38;
276 //-------------------------------------------------------------------------
277 /** CEN header field "offset of local header" offset
279 const short CENOFF
= 42;
281 //-------------------------------------------------------------------------
282 /** END header field "number of entries on this disk" offset
284 const short ENDSUB
= 8;
286 //-------------------------------------------------------------------------
287 /** END header field "total number of entries" offset
289 const short ENDTOT
= 10;
291 //-------------------------------------------------------------------------
292 /** END header field "central directory size" offset
294 const short ENDSIZ
= 12;
296 //-------------------------------------------------------------------------
297 /** END header field "central directory offset" offset
299 const short ENDOFF
= 16;
301 //-------------------------------------------------------------------------
302 /** END header field "size of zip file comment" offset
304 const short ENDCOM
= 20;
307 //=============================================================================