• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Feb-2021-

doc/H03-May-2022-261144

lib/H16-Feb-2021-24,35714,459

test/H03-May-2022-1,304997

.travis.ymlH A D16-Feb-20212.4 KiB7368

LICENSEH A D16-Feb-2021876 1714

Minizip.podspecH A D16-Feb-20211.1 KiB3832

README.mdH A D16-Feb-20216.5 KiB127102

minizip.cH A D16-Feb-202122.4 KiB742579

minizip.pc.cmakeinH A D16-Feb-2021321 1411

mz.hH A D16-Feb-20217 KiB244188

mz_compat.cH A D16-Feb-202130.2 KiB1,030838

mz_compat.hH A D16-Feb-202114.8 KiB336238

mz_crypt.cH A D16-Feb-20216.9 KiB182139

mz_crypt.hH A D16-Feb-20212.7 KiB6739

mz_crypt_apple.cH A D16-Feb-202113.6 KiB529401

mz_crypt_brg.cH A D16-Feb-202110.1 KiB442338

mz_crypt_openssl.cH A D16-Feb-202115.9 KiB680528

mz_crypt_win32.cH A D16-Feb-202120.3 KiB754598

mz_os.cH A D16-Feb-20217.7 KiB327237

mz_os.hH A D16-Feb-20214.2 KiB14462

mz_os_posix.cH A D16-Feb-20216.6 KiB302220

mz_os_win32.cH A D16-Feb-202112.4 KiB482364

mz_strm.cH A D16-Feb-202115.3 KiB592473

mz_strm.hH A D16-Feb-20215.6 KiB13292

mz_strm_buf.cH A D16-Feb-202113.1 KiB417317

mz_strm_buf.hH A D16-Feb-20211.3 KiB4420

mz_strm_bzip.cH A D16-Feb-20219.9 KiB409326

mz_strm_bzip.hH A D16-Feb-20211.4 KiB4723

mz_strm_libcomp.cH A D16-Feb-202110.6 KiB424341

mz_strm_libcomp.hH A D16-Feb-20212.4 KiB6838

mz_strm_lzma.cH A D16-Feb-202110.9 KiB439347

mz_strm_lzma.hH A D16-Feb-20211.4 KiB4522

mz_strm_mem.cH A D16-Feb-20217.1 KiB302226

mz_strm_mem.hH A D16-Feb-20211.7 KiB5027

mz_strm_os.hH A D16-Feb-20211.2 KiB4220

mz_strm_os_posix.cH A D16-Feb-20215.3 KiB229178

mz_strm_os_win32.cH A D16-Feb-20217.9 KiB320234

mz_strm_pkcrypt.cH A D16-Feb-202111.1 KiB385283

mz_strm_pkcrypt.hH A D16-Feb-20211.7 KiB4825

mz_strm_split.cH A D16-Feb-202112.9 KiB475376

mz_strm_split.hH A D16-Feb-20211.4 KiB4522

mz_strm_wzaes.cH A D16-Feb-202111.7 KiB408311

mz_strm_wzaes.hH A D16-Feb-20211.6 KiB4824

mz_strm_zlib.cH A D16-Feb-20219.6 KiB409324

mz_strm_zlib.hH A D16-Feb-20211.4 KiB4522

mz_zip.cH A D16-Feb-202187.3 KiB2,6522,104

mz_zip.hH A D16-Feb-20219.7 KiB24293

mz_zip_rw.cH A D16-Feb-202159.8 KiB2,0511,570

mz_zip_rw.hH A D16-Feb-202111.5 KiB28794

README.md

1# minizip 2.8.1
2
3minizip is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.
4
5[![License: Zlib](https://img.shields.io/badge/license-zlib-lightgrey.svg)](https://github.com/nmoinvaz/minizip/blob/master/LICENSE)
6[![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/nmoinvaz/minizip.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nmoinvaz/minizip/context:cpp)
7
8Maintained by Nathan Moinvaziri.
9
10## Branches
11
12| Name | State | Version | Description |
13|:- |:-:|:-:|:-|
14|[master](https://github.com/nmoinvaz/minizip/tree/master)|Active [![Master Branch Status](https://api.travis-ci.org/nmoinvaz/minizip.svg?branch=master)](https://travis-ci.org/nmoinvaz/minizip/branches)|2.x|Modern rewrite of 1.2 branch that includes more advanced features, improvements in code maintainability and readability, and the reduction of duplicate code. Compatibility layer provided for older versions.|
15|[dev](https://github.com/nmoinvaz/minizip/tree/dev)|Active [![Dev Branch Status](https://api.travis-ci.org/nmoinvaz/minizip.svg?branch=dev)](https://travis-ci.org/nmoinvaz/minizip/branches)|2.x|Latest development code|
16|[1.2](https://github.com/nmoinvaz/minizip/tree/1.2)|Stale| 1.x|Drop-in replacement for zlib's minizip that includes WinZip AES encryption, disk splitting, I/O buffering and some additional fixes.|
17|[1.1](https://github.com/nmoinvaz/minizip/tree/1.1)|Stale| 1.x|Original minizip as of zlib 1.2.11.|
18
19## History
20
21Minizip was originally developed by [Gilles Vollant](https://www.winimage.com/zLibDll/minizip.html) and
22had been contributed to by many people. As part of the zlib distribution, Mark Adler still maintains the
23original [minizip](https://github.com/madler/zlib/tree/master/contrib/minizip) project which is included in this repository as a reference.
24
25My work with the minizip library began in 2006 when I started submitting bugs I found to
26Gilles Vollant. In 2010, I implemented some additional features like WinZip AES encryption, disk splitting, and
27I/O buffering that were necessary for another project I was working on. Shortly after, I created this public repository
28so I could share these and other improvements with the rest of the world. I have been maintaining and actively
29developing this code base ever since. At the beginning of 2017, I began the work to refactor and rewrite
30the library as version 2 because it had become difficult to maintain and code readability suffered over the years.
31
32## Features
33
34+ Creating and extracting zip archives.
35+ Adding and removing entries from zip archives.
36+ Read and write raw zip entry data.
37+ Reading and writing zip archives from memory.
38+ Zlib, BZIP2, and LZMA compression methods.
39+ Password protection through Traditional PKWARE and [WinZIP AES](https://www.winzip.com/aes_info.htm) encryption.
40+ Buffered streaming for improved I/O performance.
41+ NTFS timestamp support for UTC last modified, last accessed, and creation dates.
42+ Disk split support for splitting zip archives into multiple files.
43+ Preservation of file attributes across file systems.
44+ Unicode filename support through UTF-8 encoding.
45+ Legacy character encoding support CP437, CP932, CP936, CP950.
46+ Turn off compilation of compression, decompression, or encryption.
47+ Windows (Win32 & WinRT), macOS and Linux platform support.
48+ Streaming interface for easy implementation of additional platforms.
49+ Support for Apple's compression library ZLIB implementation.
50+ Zero out local file header information.
51+ Zip/unzip of central directory to reduce size.
52+ Ability to generate and verify CMS signature for each entry.
53+ Recover the central directory if it is corrupt or missing.
54+ Example minizip command line tool.
55
56## Build
57
58To generate project files for your platform:
59
601. [Download and install](https://cmake.org/install/) cmake.
612. Run cmake in the minizip directory.
62
63```
64cmake . -DBUILD_TEST=ON
65cmake --build .
66```
67
68## Build Options
69
70| Name | Description | Default Value |
71|:- |:-|:-:|
72| USE_COMPAT | Enables compatibility layer | ON |
73| USE_ZLIB | Enables ZLIB compression | ON |
74| USE_BZIP2 | Enables BZIP2 compression | ON |
75| USE_LZMA | Enables LZMA compression | ON |
76| USE_PKCRYPT | Enables PKWARE traditional encryption | ON |
77| USE_WZAES | Enables WinZIP AES encryption | ON |
78| USE_LIBCOMP | Enables Apple compression | OFF |
79| USE_OPENSSL | Enables OpenSSL encryption | OFF |
80| USE_BRG | Enables Brian Gladman's library | OFF |
81| COMPRESS_ONLY | Only support compression | OFF |
82| DECOMPRESS_ONLY | Only support decompression | OFF |
83| BUILD_TEST | Builds minizip test executable | OFF |
84| BUILD_UNIT_TEST | Builds minizip unit test project | OFF |
85| BUILD_FUZZ_TEST | Builds minizip fuzz executables | OFF |
86
87## Contents
88
89| File(s) | Description |
90|:- |:-|
91| minizip.c | Sample application |
92| mz_compat.\* | Minizip 1.x compatibility layer |
93| mz.h | Error codes and flags |
94| mz_os\* | Platform specific file/utility functions |
95| mz_crypt\* | Configuration specific crypto/hashing functions |
96| mz_strm.\* | Stream interface |
97| mz_strm_buf.\* | Buffered stream |
98| mz_strm_bzip.\* | BZIP2 stream using libbzip2 |
99| mz_strm_libcomp.\* | Apple compression stream |
100| mz_strm_lzma.\* | LZMA stream using liblzma |
101| mz_strm_mem.\* | Memory stream |
102| mz_strm_split.\* | Disk splitting stream |
103| mz_strm_pkcrypt.\* | PKWARE traditional encryption stream |
104| mz_strm_os\* | Platform specific file stream |
105| mz_strm_wzaes.\* | WinZIP AES stream |
106| mz_strm_zlib.\* | Deflate stream using zlib |
107| mz_zip.\* | Zip format |
108| mz_zip_rw.\* | Zip reader/writer |
109
110## Third-Party Libraries
111
112+ [zlib](https://zlib.net/) written by Mark Adler and Jean-loup Gailly.
113  + Not included in this repository
114  + Or alternatively, [zlib-ng](https://github.com/Dead2/zlib-ng) by Hans Kristian Rosbach
115+ [BZIP2](https://www.sourceware.org/bzip2/) written by Julian Seward.
116+ [liblzma](https://tukaani.org/xz/) written by Lasse Collin.
117  + Modifications were made to support the ZIP file format specification
118+ [AES](https://github.com/BrianGladman/aes) and [SHA](https://github.com/BrianGladman/sha) libraries of Brian Gladman.
119
120## Acknowledgments
121
122Thanks to [Gilles Vollant](https://www.winimage.com/zLibDll/minizip.html) on which this work is originally based on.
123
124Thanks go out to all the people who have taken the time to contribute code reviews, testing and/or patches. This project would not have been nearly as good without you.
125
126The [ZIP format](https://github.com/nmoinvaz/minizip/blob/master/doc/appnote.txt) was defined by Phil Katz of PKWARE.
127