1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _ZIP_ENTRY_HXX_ 24 #define _ZIP_ENTRY_HXX_ 25 26 #include <rtl/ustring.hxx> 27 28 /// Data from a central directory header. 29 struct ZipEntry 30 { 31 /// version needed to extract 32 sal_Int16 nVersion; 33 /// general purpose bit flag 34 sal_Int16 nFlag; 35 /// compression method 36 sal_Int16 nMethod; 37 /// last mod file date & time 38 sal_Int32 nTime; 39 /// crc-32 40 sal_Int32 nCrc; 41 /// compressed size 42 sal_Int32 nCompressedSize; 43 /// uncompressed size 44 sal_Int32 nSize; 45 /// (Absolute) offset to the local file header 46 sal_Int32 nFileHeaderOffset; 47 /// (Absolute) offset to the file data 48 sal_Int32 nFileDataOffset; 49 /// file name length 50 sal_Int16 nPathLen; 51 /// extra field length of local file header 52 sal_Int16 nLOCExtraLen; 53 /// extra field length of central directory header 54 sal_Int16 nCENExtraLen; 55 /// file name 56 ::rtl::OUString sPath; 57 /// True if the entry has a data descriptor after the file data 58 sal_Bool bHasDataDescriptor; 59 /// Default constructor ZipEntryZipEntry60 ZipEntry(): 61 nVersion(-1), 62 nFlag(0), 63 nMethod(0), 64 nTime(-1), 65 nCrc(0), 66 nCompressedSize(0), 67 nSize(0), 68 nFileHeaderOffset(-1), 69 nFileDataOffset(-1), 70 nPathLen(0), 71 nLOCExtraLen(0), 72 nCENExtraLen(0), 73 bHasDataDescriptor(sal_False) { 74 } 75 }; 76 #endif 77