summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/packages/zip/ZipConstants.idl
blob: 553ed470782923fb3200f0a9ebdd4ac9c73413b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
#ifndef __com_sun_star_packages_zip_ZipConstants_idl__
#define __com_sun_star_packages_zip_ZipConstants_idl__




module com {  module sun {  module star {   module packages {  module zip {


/** defines the constants used by the ZIP interfaces.
 */
published constants ZipConstants
{
    /** Compression method for the deflate algorithm (the only one currently
       supported).
     */
    const short DEFLATED = 8;

    /** Compression level for no compression.
     */
    const short NO_COMPRESSION = 0;

    /** Compression level for fastest compression
     */
    const short BEST_SPEED = 1;

    /** Compression level for best compression
     */
    const short BEST_COMPRESSION = 9;

    /** Default compression level.
     */
    const short DEFAULT_COMPRESSION = -1;

    /** Compression strategy best used for data consisting mostly of small
      values with a somewhat random distribution. Forces more Huffman
      coding and less string matching.
     */
    const short FILTERED = 1;

    /** Compression strategy for Huffman coding only.
     */
    const short HUFFMAN_ONLY = 2;

    /** Default compression strategy
     */
    const short DEFAULT_STRATEGY = 0;

    /** entry is uncompressed
     */
    const short STORED = 0;

    /** entry is uncompressed
     */
    const short DEF_MEM_LEVEL = 8;

    /** Header Signature: "PK\003\004"
     */
    const long LOCSIG  = 0x04034b50;

    /** Header Signature: "PK\007\008"
     */
    const long EXTSIG  = 0x08074b50;

    /** Header Signature: "PK\001\002"
     */
    const long CENSIG  = 0x02014b50;

    /** Header Signature: "PK\005\006"
     */
    const long ENDSIG  = 0x06054b50;

    /** Header Signature: "PK\007\008"
     */
    const long SPANSIG = 0x08074b50;

    /** LOC header size in bytes (including signatures)
     */
    const short LOCHDR = 30;

    /** EXT header size in bytes (including signatures)
     */
    const short EXTHDR = 16;

    /** CEN header size in bytes (including signatures)
     */
    const short CENHDR = 46;

    /** END header size in bytes (including signatures)
     */
    const short ENDHDR = 22;

    /// LOC LOC LOC
    /** LOC header field "version needed to extract" offset
     */
    const short LOCVER = 4;

    /** LOC header field "general purpose bit flags" offset
     */
    const short LOCFLG = 6;

    /** LOC header field "compression method" offset
     */
    const short LOCHOW = 8;

    /** LOC header field "modification time" offset
     */
    const short LOCTIM = 10;

    /** LOC header field "CRC of uncompressed data" offset
     */
    const short LOCCRC = 14;

    /** LOC header field "compressed data size" offset
     */
    const short LOCSIZ = 18;

    /** LOC header field "uncompressed data size" offset
     */
    const short LOCLEN = 22;

    /** LOC header field "filename length" offset
     */
    const short LOCNAM = 26;

    /** LOC header field "extra field length" offset
     */
    const short LOCEXT = 28;

    /** EXT header field "CRC of uncompressed data" offsets
     */
    const short EXTCRC = 4;

    /** EXT header field "compressed size" offsets
     */
    const short EXTSIZ = 8;

    /** EXT header field "uncompressed size" offsets
     */
    const short EXTLEN = 12;

    /** CEN header field "version made by" offset
     */
    const short CENVEM = 4;

    /** CEN header field "version needed to extract" offset
     */
    const short CENVER = 6;

    /** CEN header field "general purpose bit flags" offset
     */
    const short CENFLG = 8;

    /** CEN header field "compression method" offset
     */
    const short CENHOW = 10;

    /** CEN header field "modification time" offset
     */
    const short CENTIM = 12;

    /** CEN header field "modification time" offset
     */
    const short CENDAT = 14;

    /** CEN header field "CRC of uncompressed data" offset
     */
    const short CENCRC = 16;

    /** CEN header field "compressed size" offset
     */
    const short CENSIZ = 20;

    /** CEN header field "uncompressed size" offset
     */
    const short CENLEN = 24;

    /** CEN header field "length of filename" offset
     */
    const short CENNAM = 28;

    /** CEN header field "length of extra field" offset
     */
    const short CENEXT = 30;

    /** CEN header field "file comment length" offset
     */
    const short CENCOM = 32;

    /** CEN header field "disk number start" offset
     */
    const short CENDSK = 34;

    /** CEN header field "internal file attributes" offset
     */
    const short CENATT = 36;

    /** CEN header field "external file attributes" offset
     */
    const short CENATX = 38;

    /** CEN header field "offset of local header" offset
     */
    const short CENOFF = 42;

    /** END header field "number of entries on this disk" offset
     */
    const short ENDSUB = 8;

    /** END header field "total number of entries" offset
     */
    const short ENDTOT = 10;

    /** END header field "central directory size" offset
     */
    const short ENDSIZ = 12;

    /** END header field "central directory offset" offset
     */
    const short ENDOFF = 16;

    /** END header field "size of zip file comment" offset
     */
    const short ENDCOM = 20;

};

}; }; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */