Warning, /graphics/krita/krita/integration/3rdparty/README.md is written in an unsupported language. File is not indexed.

0001 # Minizip 1.2
0002 
0003 Zlib contribution fork that ontains the latest bug fixes that having been found all over the internet including the [old minizip forum](https://web.archive.org/web/20121015065401/http://www.winimage.info/forum/) and zlib developer's mailing list along with some additional features. Based on the original work of [Gilles Vollant](http://www.winimage.com/zLibDll/minizip.html) and contributed to by many people over the years.
0004 
0005 ## Features
0006 
0007 ### I/O Memory
0008 
0009 To unzip from a zip file in memory use fill_memory_filefunc and supply a proper ourmemory_t structure.
0010 ```
0011 zlib_filefunc_def filefunc32 = {0};
0012 ourmemory_t unzmem = {0};
0013 
0014 unzmem.size = bufsize;
0015 unzmem.base = (char *)malloc(unzmem.size);
0016 memcpy(unzmem.base, buffer, unzmem.size);
0017     
0018 fill_memory_filefunc(&filefunc32, &unzmem);
0019 
0020 unzOpen2("__notused__", &filefunc32);
0021 ```
0022 
0023 To create a zip file in memory use fill_memory_filefunc and supply a proper ourmemory_t structure. It is important
0024 not to forget to free zipmem->base when finished. If grow is set, zipmem->base will expand to fit the size of the zip. 
0025 If grow is not set be sure to fill out zipmem.base and zipmem.size.
0026 
0027 ```
0028 zlib_filefunc_def filefunc32 = {0};
0029 ourmemory_t zipmem = {0};
0030 
0031 zipmem.grow = 1;
0032 
0033 fill_memory_filefunc(&filefunc32, &zipmem);
0034 
0035 zipOpen3("__notused__", APPEND_STATUS_CREATE, 0, 0, &filefunc32);
0036 ```
0037 
0038 ### BZIP2
0039 
0040 + Requires #define HAVE_BZIP2
0041 + Requires BZIP2 library
0042 
0043 ### Windows RT
0044 
0045 + Requires #define IOWIN32_USING_WINRT_API
0046 
0047 ## Additional Features
0048 
0049 ### [WinZIP AES Encryption](http://www.winzip.com/aes_info.htm)
0050 
0051 + Requires #define HAVE_AES
0052 + Requires AES library files
0053 
0054 When zipping with a password it will always use AES 256-bit encryption. 
0055 When unzipping it will use AES decryption only if necessary. Does not support central directory or local file header encryption.
0056 
0057 ### PKWARE disk splitting
0058 
0059 To create an archive with multiple disks use zipOpen3_64 supplying a disk size value in bytes.
0060 
0061 ```
0062 extern zipFile ZEXPORT zipOpen3_64(const void *pathname, int append, 
0063   ZPOS64_T disk_size, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def);
0064 ```
0065 The central directory is the only data stored in the .zip and doesn't follow disk size restrictions.
0066 
0067 When unzipping it will automatically determine when in needs to cross disk boundaries.
0068 
0069 ### I/O Buffering
0070 
0071 Improves I/O performance by buffering read and write operations. 
0072 ```
0073 zlib_filefunc64_def filefunc64 = {0};
0074 ourbuffer_t buffered = {0};
0075     
0076 fill_win32_filefunc64(&buffered->filefunc64);
0077 fill_buffer_filefunc64(&filefunc64, buffered);
0078     
0079 unzOpen2_64(filename, &filefunc64)
0080 ```
0081 
0082 ### Apple libcompression
0083 
0084 + Requires #define HAVE_APPLE_COMPRESSION