NCBI C++ ToolKit
archive_zip.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: archive_zip.cpp 95184 2021-10-19 16:27:44Z ivanov $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Vladimir Ivanov
27  *
28  * File Description:
29  * Compression archive API - ZIP file support.
30  *
31  */
32 
33 #include <ncbi_pch.hpp>
34 #include <util/error_codes.hpp>
35 #include <util/compress/zlib.hpp>
36 #include "archive_zip.hpp"
37 
38 #define NCBI_USE_ERRCODE_X Util_Compress
39 
40 
42 
43 
44 // Directly include miniz library
45 
46 // disable zlib emulation, we have it separately anyway
47 #define MINIZ_NO_ZLIB_APIS
48 
49 // Disable miniz warning about using large files on BSD and Cygwin64
50 #if defined(NCBI_OS_BSD) || defined(NCBI_OS_CYGWIN)
51 # define fopen64 fopen
52 # define ftello64 ftello
53 # define fseeko64 fseeko
54 # define stat64 stat
55 # define freopen64 freopen
56 # define _LARGEFILE64_SOURCE
57 #endif
58 
59 #if 1
60 
61 #include "miniz/miniz.c"
62 
63 #else
64 
65 #include "miniz_old/miniz.c"
66 #include "miniz_old/miniz_zip.c"
67 #include "miniz_old/miniz_tdef.c"
68 #include "miniz_old/miniz_tinfl.c"
69 
70 #endif
71 
72 
73 /////////////////////////////////////////////////////////////////////////
74 //
75 // Constants / macros / typedefs
76 //
77 
78 /// ZIP archive handle type definition.
79 struct SZipHandle {
81  Reset();
82  }
83  void Reset(void) {
84  memset(&zip, 0, sizeof(zip));
85  }
87 };
88 
89 
90 // Macros to work with zip-archive handle
91 #define ZIP_HANDLE &(m_Handle->zip)
92 #define ZIP_CHECK _ASSERT(m_Handle != NULL)
93 #define ZIP_NEW \
94  { \
95  _ASSERT(m_Handle == NULL); \
96  m_Handle = new SZipHandle(); \
97  _ASSERT(m_Handle != NULL); \
98  }
99 
100 #define ZIP_DELETE \
101  { \
102  _ASSERT(m_Handle != NULL); \
103  delete m_Handle; \
104  m_Handle = NULL; \
105  }
106 
107 // Throw exception
108 #define ZIP_THROW(errcode, message) \
109  NCBI_THROW(CArchiveException, errcode, message)
110 
111 
112 
113 /////////////////////////////////////////////////////////////////////////
114 //
115 // CZipArchive
116 //
117 
119 {
120  try {
121  if ( m_Handle ) {
122  Close();
123  delete m_Handle;
124  }
125  }
126  COMPRESS_HANDLE_EXCEPTIONS(94, "CArchiveZip::~CArchiveZip");
127 }
128 
129 
130 void CArchiveZip::CreateFile(const string& filename)
131 {
132  ZIP_NEW;
133  m_Mode = eWrite;
134  m_Location = eFile;
135  mz_bool status = mz_zip_writer_init_file(ZIP_HANDLE, filename.c_str(), 0);
136  if (!status) {
137  ZIP_DELETE;
138  ZIP_THROW(eCreate, "Cannot create archive file '" + filename + "'");
139  }
140  return;
141 }
142 
143 
144 void CArchiveZip::CreateFileStream(FILE* filestream)
145 {
146  ZIP_NEW;
147  m_Mode = eWrite;
149  mz_bool status = mz_zip_writer_init_cfile(ZIP_HANDLE, filestream, 0);
150  if (!status) {
151  ZIP_DELETE;
152  ZIP_THROW(eCreate, "Cannot create archive file from a FILE* stream");
153  }
154  return;
155 }
156 
157 
158 void CArchiveZip::CreateMemory(size_t initial_allocation_size)
159 {
160  ZIP_NEW;
161  m_Mode = eWrite;
163  mz_bool status = mz_zip_writer_init_heap(ZIP_HANDLE, 0, initial_allocation_size);
164  if (!status) {
165  ZIP_DELETE;
166  ZIP_THROW(eCreate, "Cannot create archive in memory");
167  }
168  return;
169 }
170 
171 
172 void CArchiveZip::OpenFile(const string& filename)
173 {
174  ZIP_NEW;
175  m_Mode = eRead;
176  m_Location = eFile;
177  mz_bool status = mz_zip_reader_init_file(ZIP_HANDLE, filename.c_str(), 0);
178  if (!status) {
179  ZIP_DELETE;
180  ZIP_THROW(eOpen, "Cannot open archive file '" + filename + "'");
181  }
182  return;
183 }
184 
185 
186 void CArchiveZip::OpenFileStream(FILE* filestream, Uint8 archive_size)
187 {
188  ZIP_NEW;
189  m_Mode = eRead;
191  mz_bool status = mz_zip_reader_init_cfile(ZIP_HANDLE, filestream, archive_size, 0);
192  if (!status) {
193  ZIP_DELETE;
194  ZIP_THROW(eOpen, "Cannot open archive from a FILE* stream");
195  }
196  return;
197 }
198 
199 
200 void CArchiveZip::OpenMemory(const void* buf, size_t size)
201 {
202  ZIP_NEW;
203  m_Mode = eRead;
206  if (!status) {
207  ZIP_DELETE;
208  ZIP_THROW(eOpen, "Cannot open archive in memory");
209  }
210  return;
211 }
212 
213 
214 void CArchiveZip::FinalizeMemory(void** buf, size_t* size)
215 {
217  _ASSERT(m_Mode == eWrite);
218  _ASSERT(buf);
219  _ASSERT(size);
220  ZIP_CHECK;
221 
222  *buf = NULL;
223  *size = 0;
225  if (!status) {
226  // Deallocate memory buffer to avoid memory leak
227  if (*buf) {
228  free(*buf);
229  *buf = NULL;
230  *size = 0;
231  }
232  ZIP_THROW(eMemory, "Cannot finalize archive in memory");
233  }
234  return;
235 }
236 
237 
239 {
240  _ASSERT(m_Mode == eRead || m_Mode == eWrite);
241  ZIP_CHECK;
242 
243  mz_bool status = true;
244  switch(m_Mode) {
245  case eRead:
246  status = mz_zip_reader_end(ZIP_HANDLE);
247  break;
248  case eWrite:
249  // Automatically finalize file archive.
250  // For an archive located in memory FinalizeMemory() should be called first,
251  // or archive will be lost on this step.
252  if (m_Location == eFile || m_Location == eFileStream) {
254  }
255  if ( !mz_zip_writer_end(ZIP_HANDLE) ) {
256  status = false;
257  }
258  break;
259  default:
260  break;
261  }
262  if (!status) {
263  ZIP_THROW(eClose, "Error closing archive");
264  }
265  ZIP_DELETE;
266  return;
267 }
268 
269 
271 {
272  _ASSERT(m_Mode == eRead);
273  ZIP_CHECK;
275  return n;
276 }
277 
278 
280 {
281  _ASSERT(m_Mode == eRead);
282  _ASSERT(info);
283  ZIP_CHECK;
284 
285  // Check index to fit 'unsigned int' which used internally in miniz
286  if (index > (size_t)kMax_UInt) {
287  NCBI_THROW(CCoreException, eInvalidArg, "Bad index value");
288  }
289  // Get file informations
291  mz_bool status = mz_zip_reader_file_stat(ZIP_HANDLE, (mz_uint)index, &fs);
292  if (!status) {
293  ZIP_THROW(eList, "Cannot get entry information by index " +
294  NStr::SizetToString(index));
295  }
296  // Copy known data into CArchiveEntryInfo
297  info->m_Index = index;
298  info->m_CompressedSize = fs.m_comp_size;
299  info->m_Stat.st_size = fs.m_uncomp_size;
300  info->m_Stat.st_atime = fs.m_time;
301  info->m_Stat.st_ctime = fs.m_time;
302  info->m_Stat.st_mtime = fs.m_time;
303  info->m_Name.assign(fs.m_filename);
304  info->m_Comment.assign(fs.m_comment, fs.m_comment_size);
305 
306  // Rough check on a directory (using MS-DOS type compatible attribute)?
308  info->m_Type = status ? CDirEntry::eDir : CDirEntry::eFile;
309 
310  // miniz don't work with entry attributes, because it
311  // is very OS- and creation software dependent.
312  // Try to analyze some common cases for Unix-type attributes:
313 
314  char ver = (char)(fs.m_version_made_by >> 8);
315  mode_t mode = (fs.m_external_attr >> 16) & 0xFFFF;
316 
317  switch (ver) {
318  // Unix
319  case 1: // Amiga
320  case 2: // VAX VMS
321  case 3: // Unix
322  case 4: // VM/CMS
323  case 5: // Atari ST
324  case 7: // Macintosh
325  case 8: // Z-System
326  case 9: // CP/M
327  {{
328  info->m_Stat.st_mode = mode;
329  info->m_Type = CDirEntry::GetType(info->m_Stat);
330  if (info->m_Type == CDirEntry::eUnknown) {
331  // Reset attributes value, we cannot be sure that
332  // it hold correct value
333  info->m_Stat.st_mode = 0;
334  }
335  }}
336  break;
337  // Dos
338  case 0: // MS-DOS or OS/2 FAT
339  case 6: // OS/2 HPFS
340  // Unknown
341  default:
342  break;
343  }
344  return;
345 }
346 
347 
349 {
350  switch (type) {
351  // supported
352  case CDirEntry::eFile:
353  case CDirEntry::eDir:
354  return true;
355  // unsupported
356  case CDirEntry::eLink:
359  case CDirEntry::ePipe:
360  case CDirEntry::eDoor:
361  case CDirEntry::eSocket:
362  case CDirEntry::eUnknown:
363  default:
364  break;
365  }
366  return false;
367 }
368 
369 
371  const string& dst_path)
372 {
373  _ASSERT(m_Mode == eRead);
374  ZIP_CHECK;
375 
376  // If this is a directory entry, we should create it.
377  if (info.GetType() == CDirEntry::eDir) {
378  if (!CDir(dst_path).CreatePath()) {
379  ZIP_THROW(eExtract, "Cannot create directory '" + dst_path + "'");
380  }
381  return;
382  }
383  // The code below extract files only.
384  mz_bool status;
385  MZ_FILE *pFile = MZ_FOPEN(dst_path.c_str(), "wb");
386  if (!pFile) {
387  ZIP_THROW(eExtract, "Cannot create target file '" + dst_path + "'");
388  }
390  mz_zip_file_write_callback, pFile, 0);
391  if (MZ_FCLOSE(pFile) == EOF) {
392  ZIP_THROW(eExtract, "Error close file '" + dst_path + "'");
393  }
394  if (!status) {
395  ZIP_THROW(eExtract, "Error extracting entry with index '" +
396  NStr::SizetToString(info.m_Index) + " to file '" + dst_path + "'");
397  }
398  return;
399 }
400 
401 
403 {
404  _ASSERT(m_Mode == eRead);
405  _ASSERT(buf);
406  _ASSERT(size);
407  ZIP_CHECK;
408 
409  // If this is a directory entry, skip it
410  if (info.GetType() == CDirEntry::eDir) {
411  return;
412  }
413  // The code below extract files only.
414  mz_bool status;
415  status = mz_zip_reader_extract_to_mem(ZIP_HANDLE, (mz_uint)info.m_Index, buf, size, 0);
416  if (!status) {
417  ZIP_THROW(eExtract, "Error extracting entry with index " +
418  NStr::SizetToString(info.m_Index) + " to memory");
419  }
420  return;
421 }
422 
423 
424 // Structure to pass all necessary data to write callback
428 };
429 
430 // Callback for extracting data, call user-defined callback to do a real job.
431 extern "C"
432 {
433  static size_t s_ZipExtractCallback(void* params, mz_uint64 /*ofs*/, const void* buf, size_t n)
434  {
435  _ASSERT(params);
437  // Call user callback
438  size_t processed = data.callback(*data.info, buf, n);
439  return processed;
440  }
441 }
442 
443 void CArchiveZip::ExtractEntryToCallback(const CArchiveEntryInfo& info, Callback_Write callback)
444 {
445  _ASSERT(m_Mode == eRead);
446  ZIP_CHECK;
447 
448  // If this is a directory entry, skip it
449  if (info.GetType() == CDirEntry::eDir) {
450  return;
451  }
452  // The code below extract files only.
454  data.callback = callback;
455  data.info = &info;
456  mz_bool status;
459  if (!status) {
460  ZIP_THROW(eExtract, "Error extracting entry with index " +
461  NStr::SizetToString(info.m_Index) + " to callback");
462  }
463  return;
464 }
465 
466 
467 // Dummy callback to test an entry extraction
468 extern "C"
469 {
470  static size_t s_ZipTestCallback(void* /*pOpaque*/, mz_uint64 /*ofs*/,
471  const void* /*pBuf*/, size_t n)
472  {
473  // Just return number of extracted bytes
474  return n;
475  }
476 }
477 
479 {
480  _ASSERT(m_Mode == eRead);
481  ZIP_CHECK;
482 
483  // If this is a directory entry, skip it
484  if (info.GetType() == CDirEntry::eDir) {
485  return;
486  }
487  // The code below test files only.
488  mz_bool status;
490  s_ZipTestCallback, 0, 0);
491  if (!status) {
492  ZIP_THROW(eExtract, "Test entry with index " +
493  NStr::SizetToString(info.m_Index) + " failed");
494  }
495  return;
496 }
497 
498 
500  const string& src_path, ELevel level)
501 {
502  if (level == CCompression::eLevel_Default) {
503  level = ELevel(MZ_DEFAULT_LEVEL);
504  }
505  const string& comment = info.m_Comment;
506  mz_uint16 comment_size = (mz_uint16)comment.size();
507  mz_bool status;
508  if (info.m_Type == CDirEntry::eDir) {
509  status = mz_zip_writer_add_mem_ex(ZIP_HANDLE, info.GetName().c_str(),
510  NULL, 0, /* empty buffer */
511  comment.c_str(), comment_size, (mz_uint)level, 0, 0);
512  } else {
513  // Files only
514  _ASSERT(info.m_Type == CDirEntry::eFile);
516  info.GetName().c_str(), src_path.c_str(),
517  comment.c_str(), comment_size, (mz_uint)level);
518  }
519  if (!status) {
520  ZIP_THROW(eAppend, "Error appending entry '" + src_path + "' to archive");
521  }
522  return;
523 }
524 
525 
527  void* buf, size_t size, ELevel level)
528 {
529  if (level == CCompression::eLevel_Default) {
530  level = ELevel(MZ_DEFAULT_LEVEL);
531  }
532  const string& comment = info.m_Comment;
533  mz_uint16 comment_size = (mz_uint16)comment.size();
534  mz_bool status;
535  status = mz_zip_writer_add_mem_ex(ZIP_HANDLE, info.GetName().c_str(),
536  buf, size, comment.c_str(), comment_size, (mz_uint)level, 0, 0);
537  if (!status) {
538  ZIP_THROW(eAppend, "Error appending entry with name '" +
539  info.GetName() + "' from memory to archive");
540  }
541  return;
542 }
543 
544 
#define ZIP_DELETE
#define ZIP_NEW
Definition: archive_zip.cpp:93
#define ZIP_HANDLE
Definition: archive_zip.cpp:91
#define ZIP_THROW(errcode, message)
static size_t s_ZipExtractCallback(void *params, mz_uint64, const void *buf, size_t n)
static size_t s_ZipTestCallback(void *, mz_uint64, const void *, size_t n)
#define ZIP_CHECK
Definition: archive_zip.cpp:92
CArchiveEntryInfo class.
Definition: archive_.hpp:112
CCoreException –.
Definition: ncbiexpt.hpp:1476
CDir –.
Definition: ncbifile.hpp:1695
char data[12]
Definition: iconv.c:80
#define NULL
Definition: ncbistd.hpp:225
virtual void CreateFile(const string &filename)
Create new archive file.
virtual void Close(void)
Close the archive.
virtual void ExtractEntryToMemory(const CArchiveEntryInfo &info, void *buf, size_t size)
Extracts an archive file to a memory buffer.
ELocation m_Location
Archive location (file/memory)
Definition: archive_.hpp:420
SZipHandle * m_Handle
Archive handle.
virtual void FinalizeMemory(void **buf, size_t *size)
Finalize the archive created in memory.
ELevel
Compression level.
Definition: compress.hpp:142
virtual void CreateFileStream(FILE *filestream)
Create new archive file on top of a FILE stream.
virtual void ExtractEntryToCallback(const CArchiveEntryInfo &info, Callback_Write callback)
Extracts an archive file using user-defined callback to process extracted data.
virtual void AddEntryFromMemory(const CArchiveEntryInfo &info, void *buf, size_t size, ELevel level)
Add entry to newly created archive from memory buffer.
virtual void OpenFileStream(FILE *filestream, Uint8 archive_size=0)
Open archive from a FILE stream, beginning at the current file position.
EDirection m_Mode
Processing direction (read/write)
Definition: archive_.hpp:419
virtual void CreateMemory(size_t initial_allocation_size=0)
Create new archive located in memory.
size_t(* Callback_Write)(const CArchiveEntryInfo &info, const void *buf, size_t n)
Type of user-defined callback for extraction from archive.
Definition: archive_.hpp:216
CCompression::ELevel ELevel
Definition: archive_.hpp:189
virtual void OpenFile(const string &filename)
Open archive file for reading.
virtual bool HaveSupport_Type(CDirEntry::EType type)
Check that current archive format have support for specific feature.
virtual void ExtractEntryToFileSystem(const CArchiveEntryInfo &info, const string &dst_path)
Extracts an archive entry to file system.
virtual void AddEntryFromFileSystem(const CArchiveEntryInfo &info, const string &src_path, ELevel level)
Add single entry to newly created archive from file system.
virtual void GetEntryInfo(size_t index, CArchiveEntryInfo *info)
Get detailed information about an archive entry by index.
#define COMPRESS_HANDLE_EXCEPTIONS(subcode, message)
Macro to catch and handle exceptions (from streams in the destructor)
Definition: compress.hpp:87
virtual ~CArchiveZip(void)
Destructor.
virtual size_t GetNumEntries(void)
Returns the total number of entries in the archive.
virtual void TestEntry(const CArchiveEntryInfo &info)
Verify entry integrity.
virtual void OpenMemory(const void *buf, size_t size)
Open archive located in memory for reading.
@ eFileStream
File stream based archive (FILE*)
Definition: archive_.hpp:199
@ eFile
File-based archive.
Definition: archive_.hpp:198
@ eMemory
Memory-based archive.
Definition: archive_.hpp:200
@ eRead
Reading from archive.
Definition: archive_.hpp:193
@ eWrite
Writing into archive.
Definition: archive_.hpp:194
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
EType
Directory entry type.
Definition: ncbifile.hpp:782
unsigned int mode_t
Definition: ncbifile.hpp:84
EType GetType(EFollowLinks follow=eIgnoreLinks) const
Get a type of a directory entry.
Definition: ncbifile.cpp:2203
@ eDir
Directory.
Definition: ncbifile.hpp:784
@ eFile
Regular file.
Definition: ncbifile.hpp:783
@ eSocket
Socket (UNIX only)
Definition: ncbifile.hpp:788
@ eUnknown
Unknown type.
Definition: ncbifile.hpp:793
@ eBlockSpecial
Block special (UNIX only)
Definition: ncbifile.hpp:790
@ eDoor
Door (UNIX only)
Definition: ncbifile.hpp:789
@ eLink
Symbolic link (UNIX only)
Definition: ncbifile.hpp:786
@ eCharSpecial
Character special.
Definition: ncbifile.hpp:791
@ ePipe
Pipe.
Definition: ncbifile.hpp:785
uint64_t Uint8
8-byte (64-bit) unsigned integer
Definition: ncbitype.h:105
#define kMax_UInt
Definition: ncbi_limits.h:185
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static string SizetToString(size_t value, TNumToStringFlags flags=0, int base=10)
Convert size_t to string.
Definition: ncbistr.cpp:2751
Definition of all error codes used in util (xutil.lib).
char * buf
yy_size_t n
static MDB_envinfo info
Definition: mdb_load.c:37
mz_bool mz_zip_reader_end(mz_zip_archive *pZip)
Definition: miniz.c:3864
mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
Definition: miniz.c:7258
mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip)
Definition: miniz.c:7666
mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning)
Definition: miniz.c:5769
mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags)
Definition: miniz.c:3944
mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index)
Definition: miniz.c:4102
mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32)
Definition: miniz.c:6114
mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size)
Definition: miniz.c:5744
mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
Definition: miniz.c:4611
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags)
Definition: miniz.c:3896
mz_bool mz_zip_writer_init_cfile(mz_zip_archive *pZip, FILE *pFile, mz_uint flags)
Definition: miniz.c:5821
static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n)
Definition: miniz.c:5119
mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, FILE *pFile, mz_uint64 archive_size, mz_uint flags)
Definition: miniz.c:4003
#define MZ_FOPEN(f, m)
Definition: miniz.c:3102
mz_bool mz_zip_writer_end(mz_zip_archive *pZip)
Definition: miniz.c:7371
mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
Definition: miniz.c:6784
mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags)
Definition: miniz.c:4547
mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat)
Definition: miniz.c:7721
#define MZ_FCLOSE
Definition: miniz.c:3103
mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **ppBuf, size_t *pSize)
Definition: miniz.c:7346
unsigned int mz_uint
Definition: miniz.h:497
#define MZ_FILE
Definition: miniz.h:516
int mz_bool
Definition: miniz.h:500
unsigned short mz_uint16
Definition: miniz.h:495
@ MZ_DEFAULT_LEVEL
Definition: miniz.h:236
uint64_t mz_uint64
Definition: miniz.h:499
mdb_mode_t mode
Definition: lmdb++.h:38
const struct ncbi::grid::netcache::search::fields::SIZE size
IArchive::Callback_Write callback
const CArchiveEntryInfo * info
ZIP archive handle type definition.
Definition: archive_zip.cpp:79
void Reset(void)
Definition: archive_zip.cpp:83
mz_zip_archive zip
Definition: archive_zip.cpp:86
mz_uint32 m_external_attr
Definition: miniz.h:960
mz_uint16 m_version_made_by
Definition: miniz.h:940
mz_uint64 m_uncomp_size
Definition: miniz.h:956
mz_uint32 m_comment_size
Definition: miniz.h:966
mz_uint64 m_comp_size
Definition: miniz.h:953
char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE]
Definition: miniz.h:979
char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE]
Definition: miniz.h:983
Definition: type.c:6
#define _ASSERT
ZLib Compression API.
void free(voidpf ptr)
Modified on Sun Apr 14 05:27:27 2024 by modify_doxy.py rev. 669887