merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / packages / zip / ZipConstants.idl
blobe8d94165fb690429a726513942b518f5ca566318
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ZipConstants.idl,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_package_zip_ZipConstants_idl__
31 #define __com_sun_star_package_zip_ZipConstants_idl__
35 //=============================================================================
37 module com { module sun { module star { module packages { module zip {
39 //=============================================================================
41 /** defines the constants used by the ZIP interfaces.
43 published constants ZipConstants
45 //-------------------------------------------------------------------------
46 /** Compression method for the deflate algorithm (the only one currently
47 supported).
49 const short DEFLATED = 8;
51 //-------------------------------------------------------------------------
52 /** Compression level for no compression.
54 const short NO_COMPRESSION = 0;
56 //-------------------------------------------------------------------------
57 /** Compression level for fastest compression
59 const short BEST_SPEED = 1;
61 //-------------------------------------------------------------------------
62 /** Compression level for best compression
64 const short BEST_COMPRESSION = 9;
66 //-------------------------------------------------------------------------
67 /** Default compression level.
69 const short DEFAULT_COMPRESSION = -1;
71 //-------------------------------------------------------------------------
72 /** Compression strategy best used for data consisting mostly of small
73 values with a somewhat random distribution. Forces more Huffman
74 coding and less string matching.
76 const short FILTERED = 1;
78 //-------------------------------------------------------------------------
79 /** Compression strategy for Huffman coding only.
81 const short HUFFMAN_ONLY = 2;
83 //-------------------------------------------------------------------------
84 /** Default compression strategy
86 const short DEFAULT_STRATEGY = 0;
88 //-------------------------------------------------------------------------
89 /** entry is uncompressed
91 const short STORED = 0;
93 //-------------------------------------------------------------------------
94 /** entry is uncompressed
96 const short DEF_MEM_LEVEL = 8;
98 //-------------------------------------------------------------------------
99 /** Header Signature: "PK\003\004"
101 const long LOCSIG = 0x04034b50;
103 //-------------------------------------------------------------------------
104 /** Header Signature: "PK\007\008"
106 const long EXTSIG = 0x08074b50;
108 //-------------------------------------------------------------------------
109 /** Header Signature: "PK\001\002"
111 const long CENSIG = 0x02014b50;
113 //-------------------------------------------------------------------------
114 /** Header Signature: "PK\005\006"
116 const long ENDSIG = 0x06054b50;
118 //-------------------------------------------------------------------------
119 /** Header Signature: "PK\007\008"
121 const long SPANSIG = 0x08074b50;
123 //-------------------------------------------------------------------------
124 /** LOC header size in bytes (including signatures)
126 const short LOCHDR = 30;
128 //-------------------------------------------------------------------------
129 /** EXT header size in bytes (including signatures)
131 const short EXTHDR = 16;
133 //-------------------------------------------------------------------------
134 /** CEN header size in bytes (including signatures)
136 const short CENHDR = 46;
138 //-------------------------------------------------------------------------
139 /** END header size in bytes (including signatures)
141 const short ENDHDR = 22;
143 //-------------------------------------------------------------------------
144 /// LOC LOC LOC
145 /** LOC header field "version needed to extract" offset
147 const short LOCVER = 4;
149 //-------------------------------------------------------------------------
150 /** LOC header field "general purpose bit flags" offset
152 const short LOCFLG = 6;
154 //-------------------------------------------------------------------------
155 /** LOC header field "compression method" offset
157 const short LOCHOW = 8;
159 //-------------------------------------------------------------------------
160 /** LOC header field "modification time" offset
162 const short LOCTIM = 10;
164 //-------------------------------------------------------------------------
165 /** LOC header field "crc of uncompressed data" offset
167 const short LOCCRC = 14;
169 //-------------------------------------------------------------------------
170 /** LOC header field "compressed data size" offset
172 const short LOCSIZ = 18;
174 //-------------------------------------------------------------------------
175 /** LOC header field "uncompressed data size" offset
177 const short LOCLEN = 22;
179 //-------------------------------------------------------------------------
180 /** LOC header field "filename length" offset
182 const short LOCNAM = 26;
184 //-------------------------------------------------------------------------
185 /** LOC header field "extra field length" offset
187 const short LOCEXT = 28;
189 //-------------------------------------------------------------------------
190 /** EXT header field "crc of uncompressed data" offsets
192 const short EXTCRC = 4;
194 //-------------------------------------------------------------------------
195 /** EXT header field "compressed size" offsets
197 const short EXTSIZ = 8;
199 //-------------------------------------------------------------------------
200 /** EXT header field "uncompressed size" offsets
202 const short EXTLEN = 12;
204 //-------------------------------------------------------------------------
205 /** CEN header field "version made by" offset
207 const short CENVEM = 4;
209 //-------------------------------------------------------------------------
210 /** CEN header field "version needed to extract" offset
212 const short CENVER = 6;
214 //-------------------------------------------------------------------------
215 /** CEN header field "general purpose bit flags" offset
217 const short CENFLG = 8;
219 //-------------------------------------------------------------------------
220 /** CEN header field "compression method" offset
222 const short CENHOW = 10;
224 //-------------------------------------------------------------------------
225 /** CEN header field "modification time" offset
227 const short CENTIM = 12;
229 //-------------------------------------------------------------------------
230 /** CEN header field "modification time" offset
232 const short CENDAT = 14;
234 //-------------------------------------------------------------------------
235 /** CEN header field "crc of uncompressed data" offset
237 const short CENCRC = 16;
239 //-------------------------------------------------------------------------
240 /** CEN header field "compressed size" offset
242 const short CENSIZ = 20;
244 //-------------------------------------------------------------------------
245 /** CEN header field "uncompressed size" offset
247 const short CENLEN = 24;
249 //-------------------------------------------------------------------------
250 /** CEN header field "length of filename" offset
252 const short CENNAM = 28;
254 //-------------------------------------------------------------------------
255 /** CEN header field "length of extra field" offset
257 const short CENEXT = 30;
259 //-------------------------------------------------------------------------
260 /** CEN header field "file comment length" offset
262 const short CENCOM = 32;
264 //-------------------------------------------------------------------------
265 /** CEN header field "disk number start" offset
267 const short CENDSK = 34;
269 //-------------------------------------------------------------------------
270 /** CEN header field "internal file attributes" offset
272 const short CENATT = 36;
274 //-------------------------------------------------------------------------
275 /** CEN header field "external file attributes" offset
277 const short CENATX = 38;
279 //-------------------------------------------------------------------------
280 /** CEN header field "offset of local header" offset
282 const short CENOFF = 42;
284 //-------------------------------------------------------------------------
285 /** END header field "number of entries on this disk" offset
287 const short ENDSUB = 8;
289 //-------------------------------------------------------------------------
290 /** END header field "total number of entries" offset
292 const short ENDTOT = 10;
294 //-------------------------------------------------------------------------
295 /** END header field "central directory size" offset
297 const short ENDSIZ = 12;
299 //-------------------------------------------------------------------------
300 /** END header field "central directory offset" offset
302 const short ENDOFF = 16;
304 //-------------------------------------------------------------------------
305 /** END header field "size of zip file comment" offset
307 const short ENDCOM = 20;
310 //=============================================================================
312 }; }; }; }; };
314 #endif