1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_packages_zip_ZipConstants_idl__
20 #define __com_sun_star_packages_zip_ZipConstants_idl__
25 module com
{ module sun
{ module star
{ module packages
{ module zip
{
28 /** defines the constants used by the ZIP interfaces.
30 published constants ZipConstants
32 /** Compression method for the deflate algorithm (the only one currently
35 const short DEFLATED
= 8;
37 /** Compression level for no compression.
39 const short NO_COMPRESSION
= 0;
41 /** Compression level for fastest compression
43 const short BEST_SPEED
= 1;
45 /** Compression level for best compression
47 const short BEST_COMPRESSION
= 9;
49 /** Default compression level.
51 const short DEFAULT_COMPRESSION
= -1;
53 /** Compression strategy best used for data consisting mostly of small
54 values with a somewhat random distribution. Forces more Huffman
55 coding and less string matching.
57 const short FILTERED
= 1;
59 /** Compression strategy for Huffman coding only.
61 const short HUFFMAN_ONLY
= 2;
63 /** Default compression strategy
65 const short DEFAULT_STRATEGY
= 0;
67 /** entry is uncompressed
69 const short STORED
= 0;
71 /** entry is uncompressed
73 const short DEF_MEM_LEVEL
= 8;
75 /** Header Signature: "PK\003\004"
77 const long LOCSIG
= 0x04034b50;
79 /** Header Signature: "PK\007\008"
81 const long EXTSIG
= 0x08074b50;
83 /** Header Signature: "PK\001\002"
85 const long CENSIG
= 0x02014b50;
87 /** Header Signature: "PK\005\006"
89 const long ENDSIG
= 0x06054b50;
91 /** Header Signature: "PK\007\008"
93 const long SPANSIG
= 0x08074b50;
95 /** LOC header size in bytes (including signatures)
97 const short LOCHDR
= 30;
99 /** EXT header size in bytes (including signatures)
101 const short EXTHDR
= 16;
103 /** CEN header size in bytes (including signatures)
105 const short CENHDR
= 46;
107 /** END header size in bytes (including signatures)
109 const short ENDHDR
= 22;
112 /** LOC header field "version needed to extract" offset
114 const short LOCVER
= 4;
116 /** LOC header field "general purpose bit flags" offset
118 const short LOCFLG
= 6;
120 /** LOC header field "compression method" offset
122 const short LOCHOW
= 8;
124 /** LOC header field "modification time" offset
126 const short LOCTIM
= 10;
128 /** LOC header field "CRC of uncompressed data" offset
130 const short LOCCRC
= 14;
132 /** LOC header field "compressed data size" offset
134 const short LOCSIZ
= 18;
136 /** LOC header field "uncompressed data size" offset
138 const short LOCLEN
= 22;
140 /** LOC header field "filename length" offset
142 const short LOCNAM
= 26;
144 /** LOC header field "extra field length" offset
146 const short LOCEXT
= 28;
148 /** EXT header field "CRC of uncompressed data" offsets
150 const short EXTCRC
= 4;
152 /** EXT header field "compressed size" offsets
154 const short EXTSIZ
= 8;
156 /** EXT header field "uncompressed size" offsets
158 const short EXTLEN
= 12;
160 /** CEN header field "version made by" offset
162 const short CENVEM
= 4;
164 /** CEN header field "version needed to extract" offset
166 const short CENVER
= 6;
168 /** CEN header field "general purpose bit flags" offset
170 const short CENFLG
= 8;
172 /** CEN header field "compression method" offset
174 const short CENHOW
= 10;
176 /** CEN header field "modification time" offset
178 const short CENTIM
= 12;
180 /** CEN header field "modification time" offset
182 const short CENDAT
= 14;
184 /** CEN header field "CRC of uncompressed data" offset
186 const short CENCRC
= 16;
188 /** CEN header field "compressed size" offset
190 const short CENSIZ
= 20;
192 /** CEN header field "uncompressed size" offset
194 const short CENLEN
= 24;
196 /** CEN header field "length of filename" offset
198 const short CENNAM
= 28;
200 /** CEN header field "length of extra field" offset
202 const short CENEXT
= 30;
204 /** CEN header field "file comment length" offset
206 const short CENCOM
= 32;
208 /** CEN header field "disk number start" offset
210 const short CENDSK
= 34;
212 /** CEN header field "internal file attributes" offset
214 const short CENATT
= 36;
216 /** CEN header field "external file attributes" offset
218 const short CENATX
= 38;
220 /** CEN header field "offset of local header" offset
222 const short CENOFF
= 42;
224 /** END header field "number of entries on this disk" offset
226 const short ENDSUB
= 8;
228 /** END header field "total number of entries" offset
230 const short ENDTOT
= 10;
232 /** END header field "central directory size" offset
234 const short ENDSIZ
= 12;
236 /** END header field "central directory offset" offset
238 const short ENDOFF
= 16;
240 /** END header field "size of zip file comment" offset
242 const short ENDCOM
= 20;
250 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */