15 #include "generalmod.h" 38 , uncompsize_(uncompsize)
39 , localheaderoffset_(offset) {}
61 enum CompLevel { NoComp=0, SuperFast=1, Fast=3, Normal=6,
65 : initialfilecount_(0)
68 , offsetofcentraldir_(0)
78 const char* errorMsg()
const;
80 bool getArchiveInfo(
const char*,
85 od_uint16 dateInDosFormat(
const char*)
const;
86 od_uint16 timeInDosFormat(
const char*)
const;
87 bool setTimeDateModified(
const char*,
od_uint16,
90 bool getBitValue(
const unsigned char byte,
91 int bitposition)
const;
92 void setBitValue(
unsigned char& byte,
int 93 bitposition,
bool value)
const;
98 bool initUnZipArchive(
const char*,
const char*);
99 bool unZipFile(
const char* srcfnm,
const char* fnm,
102 bool extractNextFile();
103 int readLocalFileHeader();
104 bool openStreamToWrite();
106 bool doZUnCompress();
107 bool readEndOfCentralDirHeader();
110 bool readZIP64EndOfCentralDirLocator();
111 bool readZIP64EndOfCentralDirRecord();
112 bool readXtraFldForZIP64(
const char*,
int);
113 bool readAndSetFileAttr();
116 bool initAppend(
const char*,
const char*);
118 bool compressNextFile();
120 int openStrmToRead(
const char* src);
121 bool setLocalFileHeader();
122 bool setLocalFileHeaderForDir();
123 bool setLocalFileHeaderForLink();
124 bool setZIP64Header();
125 bool setEndOfArchiveHeaders();
126 bool setCentralDirHeader();
128 bool setZIP64EndOfDirRecord(
od_int64);
129 bool setZIP64EndOfDirLocator(
od_int64);
134 {
return cumulativefilecounts_.last(); }
135 int getCumulativeFileCount(
int)
const;
141 bool reportReadError(
const char* filenm=0)
const;
142 bool reportWriteError(
const char* filenm=0)
const;
145 void closeInputStream();
146 void closeOutputStream();
#define mExpClass(module)
Definition: commondefs.h:160
int curfileidx_
Definition: ziphandler.h:166
Handles zipping and unzipping of files.
Definition: ziphandler.h:53
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
od_uint16 compmethod_
Definition: ziphandler.h:160
od_uint16 lastmodtime_
Definition: ziphandler.h:170
od_int64 getNrDoneSize() const
Definition: ziphandler.h:139
#define od_int64
Definition: plftypes.h:36
BufferString srcfile_
Definition: ziphandler.h:151
od_int64 od_stream_Pos
Definition: od_iosfwd.h:21
od_int64 localheaderoffset_
Definition: ziphandler.h:44
TypeSet< od_int64 > cumulativefilecounts_
Definition: ziphandler.h:168
od_int64 uncompfilesize_
Definition: ziphandler.h:158
ZipHandler()
Definition: ziphandler.h:64
od_uint32 crc_
Definition: ziphandler.h:173
ZipFileInfo(const char *fnm, od_int64 compsize, od_int64 uncompsize, od_int64 offset)
Definition: ziphandler.h:32
Set of BufferString objects.
Definition: bufstringset.h:28
od_int64 compsize_
Definition: ziphandler.h:42
OD class for stream read.
Definition: od_istream.h:24
od_int64 totalsize_
Definition: ziphandler.h:178
od_int64 nrdonesize_
Definition: ziphandler.h:179
BufferString destfile_
Definition: ziphandler.h:155
Gives information of zip archives.
Definition: ziparchiveinfo.h:27
CompLevel complevel_
Definition: ziphandler.h:161
Zip Utilities.
Definition: ziputils.h:25
od_int64 uncompsize_
Definition: ziphandler.h:43
od_int64 getTotalSize() const
Definition: ziphandler.h:138
It is an Executor class which uncompresses files of zip format but user should instead use ZipUtils::...
Definition: ziputils.h:115
od_stream_Pos offsetoflocalheader_
Definition: ziphandler.h:176
#define od_uint32
Definition: plftypes.h:32
od_uint16 lastmoddate_
Definition: ziphandler.h:171
od_int64 initialfilecount_
Definition: ziphandler.h:167
CompLevel
Definition: ziphandler.h:61
od_uint16 srcfnmsize_
Definition: ziphandler.h:152
od_int64 compfilesize_
Definition: ziphandler.h:157
It is an Executor class which compresses files into zip format but user should not use it directly in...
Definition: ziputils.h:85
od_ostream * ostrm_
Definition: ziphandler.h:181
od_stream_Pos offsetofcentraldir_
Definition: ziphandler.h:175
BufferString fnm_
Definition: ziphandler.h:41
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Zip file information.
Definition: ziphandler.h:27
BufferString destbasepath_
Definition: ziphandler.h:154
#define od_uint16
Definition: plftypes.h:28
int curinputidx_
Definition: ziphandler.h:165
FixedString Maximum()
Definition: keystrs.h:165
od_int64 getCumulativeFileCount() const
Definition: ziphandler.h:133
const BufferStringSet & getAllFileNames()
Definition: ziphandler.h:132
BufferStringSet allfilenames_
Definition: ziphandler.h:149
od_istream * istrm_
Definition: ziphandler.h:182
int curnrlevels_
Definition: ziphandler.h:163
BufferString errormsg_
Definition: ziphandler.h:148