xref: /trunk/main/offapi/com/sun/star/packages/zip/ZipConstants.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_package_zip_ZipConstants_idl__
24cdf0e10cSrcweir#define __com_sun_star_package_zip_ZipConstants_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir//=============================================================================
29cdf0e10cSrcweir
30cdf0e10cSrcweirmodule com {  module sun {  module star {   module packages {  module zip {
31cdf0e10cSrcweir
32cdf0e10cSrcweir//=============================================================================
33cdf0e10cSrcweir
34cdf0e10cSrcweir/** defines the constants used by the ZIP interfaces.
35cdf0e10cSrcweir */
36cdf0e10cSrcweirpublished constants ZipConstants
37cdf0e10cSrcweir{
38cdf0e10cSrcweir    //-------------------------------------------------------------------------
39cdf0e10cSrcweir    /** Compression method for the deflate algorithm (the only one currently
40cdf0e10cSrcweir       supported).
41cdf0e10cSrcweir     */
42cdf0e10cSrcweir    const short DEFLATED = 8;
43cdf0e10cSrcweir
44cdf0e10cSrcweir    //-------------------------------------------------------------------------
45cdf0e10cSrcweir    /** Compression level for no compression.
46cdf0e10cSrcweir     */
47cdf0e10cSrcweir    const short NO_COMPRESSION = 0;
48cdf0e10cSrcweir
49cdf0e10cSrcweir    //-------------------------------------------------------------------------
50cdf0e10cSrcweir    /** Compression level for fastest compression
51cdf0e10cSrcweir     */
52cdf0e10cSrcweir    const short BEST_SPEED = 1;
53cdf0e10cSrcweir
54cdf0e10cSrcweir    //-------------------------------------------------------------------------
55cdf0e10cSrcweir    /** Compression level for best compression
56cdf0e10cSrcweir     */
57cdf0e10cSrcweir    const short BEST_COMPRESSION = 9;
58cdf0e10cSrcweir
59cdf0e10cSrcweir    //-------------------------------------------------------------------------
60cdf0e10cSrcweir    /** Default compression level.
61cdf0e10cSrcweir     */
62cdf0e10cSrcweir    const short DEFAULT_COMPRESSION = -1;
63cdf0e10cSrcweir
64cdf0e10cSrcweir    //-------------------------------------------------------------------------
65cdf0e10cSrcweir    /** Compression strategy best used for data consisting mostly of small
66cdf0e10cSrcweir      values with a somewhat random distribution. Forces more Huffman
67cdf0e10cSrcweir      coding and less string matching.
68cdf0e10cSrcweir     */
69cdf0e10cSrcweir    const short FILTERED = 1;
70cdf0e10cSrcweir
71cdf0e10cSrcweir    //-------------------------------------------------------------------------
72cdf0e10cSrcweir    /** Compression strategy for Huffman coding only.
73cdf0e10cSrcweir     */
74cdf0e10cSrcweir    const short HUFFMAN_ONLY = 2;
75cdf0e10cSrcweir
76cdf0e10cSrcweir    //-------------------------------------------------------------------------
77cdf0e10cSrcweir    /** Default compression strategy
78cdf0e10cSrcweir     */
79cdf0e10cSrcweir    const short DEFAULT_STRATEGY = 0;
80cdf0e10cSrcweir
81cdf0e10cSrcweir    //-------------------------------------------------------------------------
82cdf0e10cSrcweir    /** entry is uncompressed
83cdf0e10cSrcweir     */
84cdf0e10cSrcweir    const short STORED = 0;
85cdf0e10cSrcweir
86cdf0e10cSrcweir    //-------------------------------------------------------------------------
87cdf0e10cSrcweir    /** entry is uncompressed
88cdf0e10cSrcweir     */
89cdf0e10cSrcweir    const short DEF_MEM_LEVEL = 8;
90cdf0e10cSrcweir
91cdf0e10cSrcweir    //-------------------------------------------------------------------------
92cdf0e10cSrcweir    /** Header Signature: "PK\003\004"
93cdf0e10cSrcweir     */
94cdf0e10cSrcweir    const long LOCSIG  = 0x04034b50;
95cdf0e10cSrcweir
96cdf0e10cSrcweir    //-------------------------------------------------------------------------
97cdf0e10cSrcweir    /** Header Signature: "PK\007\008"
98cdf0e10cSrcweir     */
99cdf0e10cSrcweir    const long EXTSIG  = 0x08074b50;
100cdf0e10cSrcweir
101cdf0e10cSrcweir    //-------------------------------------------------------------------------
102cdf0e10cSrcweir    /** Header Signature: "PK\001\002"
103cdf0e10cSrcweir     */
104cdf0e10cSrcweir    const long CENSIG  = 0x02014b50;
105cdf0e10cSrcweir
106cdf0e10cSrcweir    //-------------------------------------------------------------------------
107cdf0e10cSrcweir    /** Header Signature: "PK\005\006"
108cdf0e10cSrcweir     */
109cdf0e10cSrcweir    const long ENDSIG  = 0x06054b50;
110cdf0e10cSrcweir
111cdf0e10cSrcweir    //-------------------------------------------------------------------------
112cdf0e10cSrcweir    /** Header Signature: "PK\007\008"
113cdf0e10cSrcweir     */
114cdf0e10cSrcweir    const long SPANSIG = 0x08074b50;
115cdf0e10cSrcweir
116cdf0e10cSrcweir    //-------------------------------------------------------------------------
117cdf0e10cSrcweir    /** LOC header size in bytes (including signatures)
118cdf0e10cSrcweir     */
119cdf0e10cSrcweir    const short LOCHDR = 30;
120cdf0e10cSrcweir
121cdf0e10cSrcweir    //-------------------------------------------------------------------------
122cdf0e10cSrcweir    /** EXT header size in bytes (including signatures)
123cdf0e10cSrcweir     */
124cdf0e10cSrcweir    const short EXTHDR = 16;
125cdf0e10cSrcweir
126cdf0e10cSrcweir    //-------------------------------------------------------------------------
127cdf0e10cSrcweir    /** CEN header size in bytes (including signatures)
128cdf0e10cSrcweir     */
129cdf0e10cSrcweir    const short CENHDR = 46;
130cdf0e10cSrcweir
131cdf0e10cSrcweir    //-------------------------------------------------------------------------
132cdf0e10cSrcweir    /** END header size in bytes (including signatures)
133cdf0e10cSrcweir     */
134cdf0e10cSrcweir    const short ENDHDR = 22;
135cdf0e10cSrcweir
136cdf0e10cSrcweir    //-------------------------------------------------------------------------
137cdf0e10cSrcweir    /// LOC LOC LOC
138cdf0e10cSrcweir    /** LOC header field "version needed to extract" offset
139cdf0e10cSrcweir     */
140cdf0e10cSrcweir    const short LOCVER = 4;
141cdf0e10cSrcweir
142cdf0e10cSrcweir    //-------------------------------------------------------------------------
143cdf0e10cSrcweir    /** LOC header field "general purpose bit flags" offset
144cdf0e10cSrcweir     */
145cdf0e10cSrcweir    const short LOCFLG = 6;
146cdf0e10cSrcweir
147cdf0e10cSrcweir    //-------------------------------------------------------------------------
148cdf0e10cSrcweir    /** LOC header field "compression method" offset
149cdf0e10cSrcweir     */
150cdf0e10cSrcweir    const short LOCHOW = 8;
151cdf0e10cSrcweir
152cdf0e10cSrcweir    //-------------------------------------------------------------------------
153cdf0e10cSrcweir    /** LOC header field "modification time" offset
154cdf0e10cSrcweir     */
155cdf0e10cSrcweir    const short LOCTIM = 10;
156cdf0e10cSrcweir
157cdf0e10cSrcweir    //-------------------------------------------------------------------------
158cdf0e10cSrcweir    /** LOC header field "crc of uncompressed data" offset
159cdf0e10cSrcweir     */
160cdf0e10cSrcweir    const short LOCCRC = 14;
161cdf0e10cSrcweir
162cdf0e10cSrcweir    //-------------------------------------------------------------------------
163cdf0e10cSrcweir    /** LOC header field "compressed data size" offset
164cdf0e10cSrcweir     */
165cdf0e10cSrcweir    const short LOCSIZ = 18;
166cdf0e10cSrcweir
167cdf0e10cSrcweir    //-------------------------------------------------------------------------
168cdf0e10cSrcweir    /** LOC header field "uncompressed data size" offset
169cdf0e10cSrcweir     */
170cdf0e10cSrcweir    const short LOCLEN = 22;
171cdf0e10cSrcweir
172cdf0e10cSrcweir    //-------------------------------------------------------------------------
173cdf0e10cSrcweir    /** LOC header field "filename length" offset
174cdf0e10cSrcweir     */
175cdf0e10cSrcweir    const short LOCNAM = 26;
176cdf0e10cSrcweir
177cdf0e10cSrcweir    //-------------------------------------------------------------------------
178cdf0e10cSrcweir    /** LOC header field "extra field length" offset
179cdf0e10cSrcweir     */
180cdf0e10cSrcweir    const short LOCEXT = 28;
181cdf0e10cSrcweir
182cdf0e10cSrcweir    //-------------------------------------------------------------------------
183cdf0e10cSrcweir    /** EXT header field "crc of uncompressed data" offsets
184cdf0e10cSrcweir     */
185cdf0e10cSrcweir    const short EXTCRC = 4;
186cdf0e10cSrcweir
187cdf0e10cSrcweir    //-------------------------------------------------------------------------
188cdf0e10cSrcweir    /** EXT header field "compressed size" offsets
189cdf0e10cSrcweir     */
190cdf0e10cSrcweir    const short EXTSIZ = 8;
191cdf0e10cSrcweir
192cdf0e10cSrcweir    //-------------------------------------------------------------------------
193cdf0e10cSrcweir    /** EXT header field "uncompressed size" offsets
194cdf0e10cSrcweir     */
195cdf0e10cSrcweir    const short EXTLEN = 12;
196cdf0e10cSrcweir
197cdf0e10cSrcweir    //-------------------------------------------------------------------------
198cdf0e10cSrcweir    /** CEN header field "version made by" offset
199cdf0e10cSrcweir     */
200cdf0e10cSrcweir    const short CENVEM = 4;
201cdf0e10cSrcweir
202cdf0e10cSrcweir    //-------------------------------------------------------------------------
203cdf0e10cSrcweir    /** CEN header field "version needed to extract" offset
204cdf0e10cSrcweir     */
205cdf0e10cSrcweir    const short CENVER = 6;
206cdf0e10cSrcweir
207cdf0e10cSrcweir    //-------------------------------------------------------------------------
208cdf0e10cSrcweir    /** CEN header field "general purpose bit flags" offset
209cdf0e10cSrcweir     */
210cdf0e10cSrcweir    const short CENFLG = 8;
211cdf0e10cSrcweir
212cdf0e10cSrcweir    //-------------------------------------------------------------------------
213cdf0e10cSrcweir    /** CEN header field "compression method" offset
214cdf0e10cSrcweir     */
215cdf0e10cSrcweir    const short CENHOW = 10;
216cdf0e10cSrcweir
217cdf0e10cSrcweir    //-------------------------------------------------------------------------
218cdf0e10cSrcweir    /** CEN header field "modification time" offset
219cdf0e10cSrcweir     */
220cdf0e10cSrcweir    const short CENTIM = 12;
221cdf0e10cSrcweir
222cdf0e10cSrcweir    //-------------------------------------------------------------------------
223cdf0e10cSrcweir    /** CEN header field "modification time" offset
224cdf0e10cSrcweir     */
225cdf0e10cSrcweir    const short CENDAT = 14;
226cdf0e10cSrcweir
227cdf0e10cSrcweir    //-------------------------------------------------------------------------
228cdf0e10cSrcweir    /** CEN header field "crc of uncompressed data" offset
229cdf0e10cSrcweir     */
230cdf0e10cSrcweir    const short CENCRC = 16;
231cdf0e10cSrcweir
232cdf0e10cSrcweir    //-------------------------------------------------------------------------
233cdf0e10cSrcweir    /** CEN header field "compressed size" offset
234cdf0e10cSrcweir     */
235cdf0e10cSrcweir    const short CENSIZ = 20;
236cdf0e10cSrcweir
237cdf0e10cSrcweir    //-------------------------------------------------------------------------
238cdf0e10cSrcweir    /** CEN header field "uncompressed size" offset
239cdf0e10cSrcweir     */
240cdf0e10cSrcweir    const short CENLEN = 24;
241cdf0e10cSrcweir
242cdf0e10cSrcweir    //-------------------------------------------------------------------------
243cdf0e10cSrcweir    /** CEN header field "length of filename" offset
244cdf0e10cSrcweir     */
245cdf0e10cSrcweir    const short CENNAM = 28;
246cdf0e10cSrcweir
247cdf0e10cSrcweir    //-------------------------------------------------------------------------
248cdf0e10cSrcweir    /** CEN header field "length of extra field" offset
249cdf0e10cSrcweir     */
250cdf0e10cSrcweir    const short CENEXT = 30;
251cdf0e10cSrcweir
252cdf0e10cSrcweir    //-------------------------------------------------------------------------
253cdf0e10cSrcweir    /** CEN header field "file comment length" offset
254cdf0e10cSrcweir     */
255cdf0e10cSrcweir    const short CENCOM = 32;
256cdf0e10cSrcweir
257cdf0e10cSrcweir    //-------------------------------------------------------------------------
258cdf0e10cSrcweir    /** CEN header field "disk number start" offset
259cdf0e10cSrcweir     */
260cdf0e10cSrcweir    const short CENDSK = 34;
261cdf0e10cSrcweir
262cdf0e10cSrcweir    //-------------------------------------------------------------------------
263cdf0e10cSrcweir    /** CEN header field "internal file attributes" offset
264cdf0e10cSrcweir     */
265cdf0e10cSrcweir    const short CENATT = 36;
266cdf0e10cSrcweir
267cdf0e10cSrcweir    //-------------------------------------------------------------------------
268cdf0e10cSrcweir    /** CEN header field "external file attributes" offset
269cdf0e10cSrcweir     */
270cdf0e10cSrcweir    const short CENATX = 38;
271cdf0e10cSrcweir
272cdf0e10cSrcweir    //-------------------------------------------------------------------------
273cdf0e10cSrcweir    /** CEN header field "offset of local header" offset
274cdf0e10cSrcweir     */
275cdf0e10cSrcweir    const short CENOFF = 42;
276cdf0e10cSrcweir
277cdf0e10cSrcweir    //-------------------------------------------------------------------------
278cdf0e10cSrcweir    /** END header field "number of entries on this disk" offset
279cdf0e10cSrcweir     */
280cdf0e10cSrcweir    const short ENDSUB = 8;
281cdf0e10cSrcweir
282cdf0e10cSrcweir    //-------------------------------------------------------------------------
283cdf0e10cSrcweir    /** END header field "total number of entries" offset
284cdf0e10cSrcweir     */
285cdf0e10cSrcweir    const short ENDTOT = 10;
286cdf0e10cSrcweir
287cdf0e10cSrcweir    //-------------------------------------------------------------------------
288cdf0e10cSrcweir    /** END header field "central directory size" offset
289cdf0e10cSrcweir     */
290cdf0e10cSrcweir    const short ENDSIZ = 12;
291cdf0e10cSrcweir
292cdf0e10cSrcweir    //-------------------------------------------------------------------------
293cdf0e10cSrcweir    /** END header field "central directory offset" offset
294cdf0e10cSrcweir     */
295cdf0e10cSrcweir    const short ENDOFF = 16;
296cdf0e10cSrcweir
297cdf0e10cSrcweir    //-------------------------------------------------------------------------
298cdf0e10cSrcweir    /** END header field "size of zip file comment" offset
299cdf0e10cSrcweir     */
300cdf0e10cSrcweir    const short ENDCOM = 20;
301cdf0e10cSrcweir
302cdf0e10cSrcweir};
303cdf0e10cSrcweir//=============================================================================
304cdf0e10cSrcweir
305cdf0e10cSrcweir}; }; }; }; };
306cdf0e10cSrcweir
307cdf0e10cSrcweir#endif
308